Fix bogus console warning message from IMAP offline journal
authorMilan Crha <mcrha@redhat.com>
Thu, 2 Sep 2010 07:52:41 +0000 (09:52 +0200)
committerMilan Crha <mcrha@redhat.com>
Thu, 2 Sep 2010 07:52:41 +0000 (09:52 +0200)
There could be a deleted message in an offline journal in an IMAP account,
and while replying such journal the error message was reported to the caller
about not being able to find it, and the offline entry wasn't removed.
This change ignores the error to be able to get rid of the entry.

camel/providers/imap/camel-imap-journal.c

index e939596..b7cc289 100644 (file)
@@ -328,8 +328,12 @@ imap_entry_play (CamelOfflineJournal *journal, CamelDListNode *entry, GError **e
                CamelMessageInfo *info;
 
                message = camel_folder_get_message (journal->folder, imap_entry->append_uid, error);
-               if (!message)
-                       return -1;
+               if (!message) {
+                       /* it seems message gone, just ignore the error and continue;
+                          otherwise the entry would not be removed from the list */
+                       g_clear_error (error);
+                       return 0;
+               }
 
                info = camel_folder_get_message_info (journal->folder, imap_entry->append_uid);
                camel_imap_append_resyncing (