Revision 3197 libsylph/mh.c
| mh.c (revision 3197) | ||
|---|---|---|
| 1665 | 1665 |
mh_remove_missing_folder_items_func, folder); |
| 1666 | 1666 |
} |
| 1667 | 1667 |
|
| 1668 |
#define MAX_RECURSION_LEVEL 64 |
|
| 1669 |
|
|
| 1668 | 1670 |
static void mh_scan_tree_recursive(FolderItem *item) |
| 1669 | 1671 |
{
|
| 1670 | 1672 |
Folder *folder; |
| ... | ... | |
| 1691 | 1693 |
|
| 1692 | 1694 |
folder = item->folder; |
| 1693 | 1695 |
|
| 1696 |
debug_print("scanning %s ...\n",
|
|
| 1697 |
item->path ? item->path : LOCAL_FOLDER(folder)->rootpath); |
|
| 1698 |
if (folder->ui_func) |
|
| 1699 |
folder->ui_func(folder, item, folder->ui_func_data); |
|
| 1700 |
|
|
| 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 |
|
|
| 1694 | 1722 |
fs_path = item->path ? |
| 1695 | 1723 |
g_filename_from_utf8(item->path, -1, NULL, NULL, NULL) |
| 1696 | 1724 |
: g_strdup(".");
|
| ... | ... | |
| 1713 | 1741 |
#endif |
| 1714 | 1742 |
g_free(fs_path); |
| 1715 | 1743 |
|
| 1716 |
debug_print("scanning %s ...\n",
|
|
| 1717 |
item->path ? item->path |
|
| 1718 |
: LOCAL_FOLDER(item->folder)->rootpath); |
|
| 1719 |
if (folder->ui_func) |
|
| 1720 |
folder->ui_func(folder, item, folder->ui_func_data); |
|
| 1721 |
|
|
| 1722 | 1744 |
#ifdef G_OS_WIN32 |
| 1723 | 1745 |
do {
|
| 1724 | 1746 |
if (!wfd.file_name) continue; |
| ... | ... | |
| 1845 | 1867 |
#else |
| 1846 | 1868 |
closedir(dp); |
| 1847 | 1869 |
#endif |
| 1848 |
|
|
| 1849 |
if (item->path) {
|
|
| 1850 |
gint new, unread, total, min, max; |
|
| 1851 |
|
|
| 1852 |
procmsg_get_mark_sum |
|
| 1853 |
(item, &new, &unread, &total, &min, &max, 0); |
|
| 1854 |
if (n_msg > total) {
|
|
| 1855 |
new += n_msg - total; |
|
| 1856 |
unread += n_msg - total; |
|
| 1857 |
} |
|
| 1858 |
item->new = new; |
|
| 1859 |
item->unread = unread; |
|
| 1860 |
item->total = n_msg; |
|
| 1861 |
item->updated = TRUE; |
|
| 1862 |
item->mtime = 0; |
|
| 1863 |
} |
|
| 1864 | 1870 |
} |
| 1865 | 1871 |
|
| 1866 | 1872 |
static gboolean mh_rename_folder_func(GNode *node, gpointer data) |
Also available in: Unified diff