diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-19 09:00:41 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-19 09:00:41 +0000 |
commit | f2d5fbd592db74d3d16c9128ff3b7e2ce32db5f5 (patch) | |
tree | 64d2f8d767fc054ff8ef23b495131a7f8da2c95c /libsylph/imap.c | |
parent | 784fa78588cc6e01b92bb0fe8dd8177115c1810c (diff) |
handle virtual folders under IMAP4 folders properly.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@908 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/imap.c')
-rw-r--r-- | libsylph/imap.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libsylph/imap.c b/libsylph/imap.c index c3127cc9..43ccdeec 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -49,6 +49,7 @@ #include "base64.h" #include "utils.h" #include "prefs_common.h" +#include "virtual.h" #define IMAP4_PORT 143 #if USE_SSL @@ -1781,9 +1782,14 @@ static gint imap_scan_tree_recursive(IMAPSession *session, FolderItem *item) } } if (!new_item) { - debug_print("folder '%s' not found. removing...\n", - old_item->path); - folder_item_remove(old_item); + if (old_item->stype != F_VIRTUAL) { + debug_print("folder '%s' not found. removing...\n", old_item->path); + folder_item_remove(old_item); + } + } else if (old_item->stype == F_VIRTUAL) { + debug_print("IMAP4 folder found at the location of virtual folder '%s'. removing virtual folder...\n", old_item->path); + virtual_get_class()->remove_folder + (folder, old_item); } else { old_item->no_sub = new_item->no_sub; old_item->no_select = new_item->no_select; |