diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 5 | ||||
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 9780502f64..2c592350c8 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,8 @@ +2002-07-15 Peter Williams <peterw@ximian.com> + + * providers/imap/camel-imap-folder.c (imap_get_message): If we're + not online and the message isn't in our cache, give up. + 2002-07-15 Not Zed <NotZed@Ximian.com> * camel-filter-search.c (get_label): Removed. 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); |