From 5dbeb5d194b48429f9e59c03246288bbac5db70e Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 17 Aug 2012 15:03:03 +0200 Subject: [PATCH] Bug #680744 - IMAP: Does not update folder structure --- camel/providers/imap/camel-imap-store.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index 1ce6bb8..51e12ca 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -2794,6 +2794,10 @@ get_folders_sync (CamelImapStore *imap_store, "%s \"\" %G", j==1 ? "LSUB" : "LIST", pattern); if (!response) { + /* do not worry if checking in some namespace fails */ + if (!ppattern) + continue; + success = FALSE; g_free (tmp); goto fail; @@ -2964,7 +2968,10 @@ refresh_refresh (CamelSession *session, if (!get_folders_sync (store, "INBOX", cancellable, error)) goto done; } else { - if (!get_folders_sync (store, "*", cancellable, error)) + /* this can fail on some servers, thus just try it, but do not skip + look in all namespaces, unless the operation was cancelled */ + if (!get_folders_sync (store, "*", cancellable, NULL) && + g_cancellable_is_cancelled (cancellable)) goto done; } -- 2.7.4