aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-folder.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index ee8a7b1f4a..8688adb8a0 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1821,7 +1821,13 @@ imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
if (store->server_level < IMAP_LEVEL_IMAP4REV1 ||
(stream = camel_imap_folder_fetch_data (imap_folder, uid, "", TRUE, NULL)))
return get_message_simple (imap_folder, uid, stream, ex);
-
+
+ /* If we're not actually connected and it's not in the cache,
+ * that's as far as we can go.
+ */
+ if (camel_disco_store_check_online (CAMEL_DISCO_STORE (store), ex) == FALSE)
+ return NULL;
+
mi = camel_folder_summary_uid (folder->summary, uid);
g_return_val_if_fail (mi != NULL, NULL);