Revision 3233

View differences:

libsylph/mh.c
1693 1693

  
1694 1694
	folder = item->folder;
1695 1695

  
1696
	if (g_node_depth(item->node) >= MAX_RECURSION_LEVEL) {
1697
		g_warning("mh_scan_tree_recursive(): max recursion level (%u) reached.", MAX_RECURSION_LEVEL);
1698
		return;
1699
	}
1700

  
1696 1701
	debug_print("scanning %s ...\n",
1697 1702
		    item->path ? item->path : LOCAL_FOLDER(folder)->rootpath);
1698 1703
	if (folder->ui_func)
1699 1704
		folder->ui_func(folder, item, folder->ui_func_data);
1700 1705

  
1701
	if (item->path) {
1702
		gint new, unread, total, min, max;
1703

  
1704
		procmsg_get_mark_sum
1705
			(item, &new, &unread, &total, &min, &max, 0);
1706
		if (n_msg > total) {
1707
			new += n_msg - total;
1708
			unread += n_msg - total;
1709
		}
1710
		item->new = new;
1711
		item->unread = unread;
1712
		item->total = n_msg;
1713
		item->updated = TRUE;
1714
		item->mtime = 0;
1715
	}
1716

  
1717
	if (g_node_depth(item->node) >= MAX_RECURSION_LEVEL) {
1718
		g_warning("mh_scan_tree_recursive(): max recursion level (%u) reached.", MAX_RECURSION_LEVEL);
1719
		return;
1720
	}
1721

  
1722 1706
	fs_path = item->path ?
1723 1707
		g_filename_from_utf8(item->path, -1, NULL, NULL, NULL)
1724 1708
		: g_strdup(".");
......
1867 1851
#else
1868 1852
	closedir(dp);
1869 1853
#endif
1854

  
1855
	if (item->path) {
1856
		gint new, unread, total, min, max;
1857

  
1858
		procmsg_get_mark_sum
1859
			(item, &new, &unread, &total, &min, &max, 0);
1860
		if (n_msg > total) {
1861
			new += n_msg - total;
1862
			unread += n_msg - total;
1863
		}
1864
		item->new = new;
1865
		item->unread = unread;
1866
		item->total = n_msg;
1867
		item->updated = TRUE;
1868
		item->mtime = 0;
1869
	}
1870 1870
}
1871 1871

  
1872 1872
static gboolean mh_rename_folder_func(GNode *node, gpointer data)
ChangeLog
1
2013-03-13
2

  
3
	* libsylph/mh.c: mh_scan_tree_recursive(): fixed rebuilding of folder
4
	  tree which had been broken at 3.4.0beta1 (#103).
5

  
1 6
2013-02-15
2 7

  
3 8
	* procheader_scan_date_string(): optimized.

Also available in: Unified diff