diff options
Diffstat (limited to 'camel/providers/mh/camel-mh-summary.c')
-rw-r--r-- | camel/providers/mh/camel-mh-summary.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/camel/providers/mh/camel-mh-summary.c b/camel/providers/mh/camel-mh-summary.c index 83f2113445..36bfd2f2cf 100644 --- a/camel/providers/mh/camel-mh-summary.c +++ b/camel/providers/mh/camel-mh-summary.c @@ -258,15 +258,17 @@ int camel_mh_summary_sync(CamelMhSummary * mhs, int expunge, CamelException *ex CamelMessageInfo *info; char *name; + printf("summary_sync(expunge=%s)\n", expunge?"true":"false"); + if (!expunge) return 0; count = camel_folder_summary_count((CamelFolderSummary *)mhs); - for (i=0;i<count;i++) { + for (i=count-1;i>=0;i--) { info = camel_folder_summary_index((CamelFolderSummary *)mhs, i); if (info && info->flags & CAMEL_MESSAGE_DELETED) { name = g_strdup_printf("%s/%s", mhs->mh_path, info->uid); - d(printf("deleting %s\n", name)); + (printf("deleting %s\n", name)); if (unlink(name) == 0 || errno==ENOENT) { camel_folder_summary_remove((CamelFolderSummary *)mhs, info); } |