aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/local/camel-local-summary.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/local/camel-local-summary.c')
-rw-r--r--camel/providers/local/camel-local-summary.c21
1 files changed, 13 insertions, 8 deletions
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 *