+2008-11-06 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #555979
+
+ * camel-store.c: (ignore_no_such_table_exception): New helper function.
+ * camel-store.c: (store_sync): Ignore 'no such table' exceptions.
+
2008-10-31 Matthew Barnes <mbarnes@redhat.com>
** Fixes part of bug #558727 (patch by Frederic van Starbmann)
return camel_store_get_folder(store, CAMEL_VJUNK_NAME, 0, ex);
}
+/**
+ * ignore_no_such_table_exception:
+ * Clears the exception 'ex' when it's the 'no such table' exception.
+ **/
+static void
+ignore_no_such_table_exception (CamelException *ex)
+{
+ if (ex && camel_exception_is_set (ex) && g_ascii_strncasecmp (camel_exception_get_description (ex), "no such table", 13) == 0)
+ camel_exception_clear (ex);
+}
+
static void
store_sync (CamelStore *store, int expunge, CamelException *ex)
{
for (i=0;i<folders->len;i++) {
folder = folders->pdata[i];
if (!CAMEL_IS_VEE_FOLDER(folder)
- && !camel_exception_is_set(&x))
+ && !camel_exception_is_set(&x)) {
camel_folder_sync(folder, expunge, &x);
- else if (CAMEL_IS_VEE_FOLDER(folder))
+ ignore_no_such_table_exception (&x);
+ } else if (CAMEL_IS_VEE_FOLDER(folder))
camel_vee_folder_sync_headers(folder, NULL); /* Literally don't care of vfolder exceptions */
camel_object_unref(folder);
}