From a39364e258908a69c25dc890788203b2663263f6 Mon Sep 17 00:00:00 2001 From: 3 Date: Wed, 3 Oct 2001 23:05:06 +0000 Subject: Dont explicitly save metadata, its saved in summary_sync. 2001-10-03 * providers/local/camel-local-folder.c (local_sync): Dont explicitly save metadata, its saved in summary_sync. * providers/local/camel-mh-summary.c: Call superclass. (mh_summary_check): Dont save ibex. * providers/local/camel-maildir-summary.c: Call superclass method. (maildir_summary_check): Dont save ibex explictly. * providers/local/camel-mbox-summary.c: Call super-class sync when done, saves summary/ibex, etc. (mbox_summary_check): Dont save ibex. (mbox_summary_sync): Call summary_check rather than trying to update from our known position. * providers/local/camel-local-summary.c (camel_local_summary_check): Dont save the summary or index here. (local_summary_sync): Save the summary/index here. svn path=/trunk/; revision=13397 --- camel/providers/local/camel-local-summary.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'camel/providers/local/camel-local-summary.c') diff --git a/camel/providers/local/camel-local-summary.c b/camel/providers/local/camel-local-summary.c index 3202076520..1a201840e2 100644 --- a/camel/providers/local/camel-local-summary.c +++ b/camel/providers/local/camel-local-summary.c @@ -255,13 +255,6 @@ camel_local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changei ret = ((CamelLocalSummaryClass *)(CAMEL_OBJECT_GET_CLASS(cls)))->check(cls, changeinfo, ex); - if (ret != -1) { - if (camel_folder_summary_save((CamelFolderSummary *)cls) == -1) - g_warning("Could not save summary for %s: %s", cls->folder_path, strerror(errno)); - if (cls->index && ibex_save(cls->index) == -1) - g_warning("Could not sync index for %s: %s", cls->folder_path, strerror(errno)); - } - #ifdef DOSTATS if (ret != -1) { int i; @@ -366,7 +359,19 @@ local_summary_check(CamelLocalSummary *cls, CamelFolderChangeInfo *changeinfo, C static int local_summary_sync(CamelLocalSummary *cls, gboolean expunge, CamelFolderChangeInfo *changeinfo, CamelException *ex) { - return 0; + int ret = 0; + + ret = camel_folder_summary_save((CamelFolderSummary *)cls); + if (ret == -1) { + camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, + _("Could not save summary: %s: %s"), cls->folder_path, strerror(errno)); + g_warning("Could not save summary for %s: %s", cls->folder_path, strerror(errno)); + } + + if (cls->index && ibex_save(cls->index) == -1) + g_warning("Could not sync index for %s: %s", cls->folder_path, strerror(errno)); + + return ret; } static CamelMessageInfo * -- cgit v1.2.3