Renamed from camel_mbox_summary_expunge. Takes a gboolean saying whether
authorDan Winship <danw@src.gnome.org>
Wed, 7 Jun 2000 00:06:28 +0000 (00:06 +0000)
committerDan Winship <danw@src.gnome.org>
Wed, 7 Jun 2000 00:06:28 +0000 (00:06 +0000)
* providers/mbox/camel-mbox-summary.c (camel_mbox_summary_sync):
Renamed from camel_mbox_summary_expunge. Takes a gboolean saying
whether to expunge or just sync the mbox file. Change some
g_errors to g_warning so we don't abort. Make the quick
X-Evolution updating code lseek around correctly. Update the
mbox mtime in the summary file even in the quick case.

* providers/mbox/camel-mbox-summary.h: make
CAMEL_MESSAGE_FOLDER_NOXEV not conflict with
CAMEL_MESSAGE_FOLDER_FLAGGED defined in camel-mime-message.h

* providers/mbox/camel-mbox-folder.c (mbox_close): call
camel_mbox_summary_sync to save flag state if not expunging.
(mbox_expunge): Update for camel_mbox_summary_expunge rename.

camel/providers/mbox/camel-mbox-folder.c

index 305935f..07accc5 100644 (file)
@@ -243,9 +243,10 @@ mbox_close (CamelFolder *folder, gboolean expunge, CamelException *ex)
        /* call parent implementation */
        parent_class->close (folder, expunge, ex);
 
-       if (expunge) {
+       if (expunge)
                mbox_expunge(folder, ex);
-       }
+       else
+               camel_mbox_summary_sync(mbox_folder->summary, FALSE);
 
        /* save index */
        if (mbox_folder->index) {
@@ -268,7 +269,7 @@ mbox_expunge (CamelFolder *folder, CamelException *ex)
 {
        CamelMboxFolder *mbox = (CamelMboxFolder *)folder;
 
-       if (camel_mbox_summary_expunge(mbox->summary) == -1) {
+       if (camel_mbox_summary_sync(mbox->summary, TRUE) == -1) {
                camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID, /* FIXME: right error code */
                                      "Could not expunge: %s", strerror(errno));
        }