aboutsummaryrefslogtreecommitdiff
path: root/libsylph/mh.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-03-13 09:26:43 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2013-03-13 09:26:43 +0000
commit95c2d951daae088d33526c0a18abba48aa3a6d91 (patch)
treeb5e55ea0208e4d691ae2b661041aaf730330ada2 /libsylph/mh.c
parent6bb168d881a235009bb2d3e77ed5ee35f36060c8 (diff)
fixed rebuilding of folder tree which had been broken at 3.4.0beta1 (#103).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3233 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/mh.c')
-rw-r--r--libsylph/mh.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/libsylph/mh.c b/libsylph/mh.c
index e8afa6b9..e30c0078 100644
--- a/libsylph/mh.c
+++ b/libsylph/mh.c
@@ -1693,32 +1693,16 @@ static void mh_scan_tree_recursive(FolderItem *item)
folder = item->folder;
- debug_print("scanning %s ...\n",
- item->path ? item->path : LOCAL_FOLDER(folder)->rootpath);
- if (folder->ui_func)
- folder->ui_func(folder, item, folder->ui_func_data);
-
- if (item->path) {
- gint new, unread, total, min, max;
-
- procmsg_get_mark_sum
- (item, &new, &unread, &total, &min, &max, 0);
- if (n_msg > total) {
- new += n_msg - total;
- unread += n_msg - total;
- }
- item->new = new;
- item->unread = unread;
- item->total = n_msg;
- item->updated = TRUE;
- item->mtime = 0;
- }
-
if (g_node_depth(item->node) >= MAX_RECURSION_LEVEL) {
g_warning("mh_scan_tree_recursive(): max recursion level (%u) reached.", MAX_RECURSION_LEVEL);
return;
}
+ debug_print("scanning %s ...\n",
+ item->path ? item->path : LOCAL_FOLDER(folder)->rootpath);
+ if (folder->ui_func)
+ folder->ui_func(folder, item, folder->ui_func_data);
+
fs_path = item->path ?
g_filename_from_utf8(item->path, -1, NULL, NULL, NULL)
: g_strdup(".");
@@ -1867,6 +1851,22 @@ static void mh_scan_tree_recursive(FolderItem *item)
#else
closedir(dp);
#endif
+
+ if (item->path) {
+ gint new, unread, total, min, max;
+
+ procmsg_get_mark_sum
+ (item, &new, &unread, &total, &min, &max, 0);
+ if (n_msg > total) {
+ new += n_msg - total;
+ unread += n_msg - total;
+ }
+ item->new = new;
+ item->unread = unread;
+ item->total = n_msg;
+ item->updated = TRUE;
+ item->mtime = 0;
+ }
}
static gboolean mh_rename_folder_func(GNode *node, gpointer data)