From f5c004ce24914f4f72d63ca1fa4ccaecc4414c90 Mon Sep 17 00:00:00 2001 From: hiro Date: Mon, 14 Nov 2005 10:00:00 +0000 Subject: fixes occasional summary update failure on win32 and some filesystems. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@744 ee746299-78ed-0310-b773-934348b2243d --- ChangeLog | 8 ++++++++ ChangeLog.ja | 8 ++++++++ libsylph/mbox.c | 3 --- libsylph/mh.c | 8 ++++++++ src/compose.c | 1 - 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b0c5db8..3da8b15e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-11-14 + + * libsylph/mh.c + libsylph/mbox.c + src/compose.c: always set FolderItem::mtime to 0 if the folder + contents changed (fixes occasional summary update failure on win32 + and some filesystems). + 2005-11-14 * libsylph/utils.[ch] diff --git a/ChangeLog.ja b/ChangeLog.ja index c04c09da..7839e4cc 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,11 @@ +2005-11-14 + + * libsylph/mh.c + libsylph/mbox.c + src/compose.c: フォルダの内容が変更された場合常に FolderItem::mtime + を 0 にセットするようにした(win32 やいくつかのファイルシステムで + サマリの更新に失敗することがあったのを修正)。 + 2005-11-14 * libsylph/utils.[ch] diff --git a/libsylph/mbox.c b/libsylph/mbox.c index 854c1105..83d65897 100644 --- a/libsylph/mbox.c +++ b/libsylph/mbox.c @@ -231,9 +231,6 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table) drop_folder)); } if (val == 0) { - /* force updating */ - if (FOLDER_IS_LOCAL(drop_folder->folder)) - drop_folder->mtime = 0; if (folder_table) { g_hash_table_insert(folder_table, drop_folder, diff --git a/libsylph/mh.c b/libsylph/mh.c index f397eaf9..8015d5ba 100644 --- a/libsylph/mh.c +++ b/libsylph/mh.c @@ -422,6 +422,7 @@ static gint mh_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, dest->last_num++; dest->total++; dest->updated = TRUE; + dest->mtime = 0; if (fileinfo->flags) { if (MSG_IS_RECEIVED(*fileinfo->flags)) { @@ -511,9 +512,11 @@ static gint mh_do_move_msgs(Folder *folder, FolderItem *dest, GSList *msglist) g_free(destfile); src->total--; src->updated = TRUE; + src->mtime = 0; dest->last_num++; dest->total++; dest->updated = TRUE; + dest->mtime = 0; if (fp) { SET_DEST_MSG_FLAGS(fp, dest, dest->last_num, @@ -633,6 +636,7 @@ static gint mh_copy_msgs(Folder *folder, FolderItem *dest, GSList *msglist) dest->last_num++; dest->total++; dest->updated = TRUE; + dest->mtime = 0; if (fp) { SET_DEST_MSG_FLAGS(fp, dest, dest->last_num, @@ -668,6 +672,7 @@ static gint mh_remove_msg(Folder *folder, FolderItem *item, MsgInfo *msginfo) item->total--; item->updated = TRUE; + item->mtime = 0; if (MSG_IS_NEW(msginfo->flags)) item->new--; if (MSG_IS_UNREAD(msginfo->flags)) @@ -695,6 +700,7 @@ static gint mh_remove_all_msg(Folder *folder, FolderItem *item) item->new = item->unread = item->total = 0; item->last_num = 0; item->updated = TRUE; + item->mtime = 0; } return val; @@ -779,6 +785,7 @@ static gint mh_scan_folder_full(Folder *folder, FolderItem *item, } item->updated = TRUE; + item->mtime = 0; debug_print(_("Last number in dir %s = %d\n"), item->path, max); item->last_num = max; @@ -1423,6 +1430,7 @@ static void mh_scan_tree_recursive(FolderItem *item) item->unread = unread; item->total = n_msg; item->updated = TRUE; + item->mtime = 0; } } diff --git a/src/compose.c b/src/compose.c index c805d77e..50f43a61 100644 --- a/src/compose.c +++ b/src/compose.c @@ -5700,7 +5700,6 @@ static void compose_draft_cb(gpointer data, guint action, GtkWidget *widget) return; } g_free(tmp); - draft->mtime = 0; /* force updating */ if (compose->mode == COMPOSE_REEDIT) { compose_remove_reedit_target(compose); -- cgit v1.2.3