From f2d5fbd592db74d3d16c9128ff3b7e2ce32db5f5 Mon Sep 17 00:00:00 2001 From: hiro Date: Thu, 19 Jan 2006 09:00:41 +0000 Subject: handle virtual folders under IMAP4 folders properly. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@908 ee746299-78ed-0310-b773-934348b2243d --- libsylph/imap.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'libsylph/imap.c') 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; -- cgit v1.2.3