diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-05-26 03:58:37 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-05-26 03:58:37 +0800 |
commit | 6815fa8a3940102199da8d9be1e49e55f6efab11 (patch) | |
tree | 8f0bc18616f1b8b33d7ea29b99e03996167f6564 /camel/providers/local/camel-mbox-folder.c | |
parent | 03df6fccdefe8b11215183bf4dcfef71eef2290c (diff) | |
download | gsoc2013-evolution-6815fa8a3940102199da8d9be1e49e55f6efab11.tar gsoc2013-evolution-6815fa8a3940102199da8d9be1e49e55f6efab11.tar.gz gsoc2013-evolution-6815fa8a3940102199da8d9be1e49e55f6efab11.tar.bz2 gsoc2013-evolution-6815fa8a3940102199da8d9be1e49e55f6efab11.tar.lz gsoc2013-evolution-6815fa8a3940102199da8d9be1e49e55f6efab11.tar.xz gsoc2013-evolution-6815fa8a3940102199da8d9be1e49e55f6efab11.tar.zst gsoc2013-evolution-6815fa8a3940102199da8d9be1e49e55f6efab11.zip |
remove the summary info so we are not out-of-sync with the maildir folder.
2001-05-25 Jeffrey Stedfast <fejj@ximian.com>
* providers/local/camel-maildir-folder.c (maildir_append_message):
remove the summary info so we are not out-of-sync with the maildir
folder.
* providers/local/camel-mh-folder.c (mh_append_message): remove
the summary info so we are not out-of-sync with the mh folder.
* providers/local/camel-mbox-folder.c (mbox_append_message):
remove the summary info so we are not out-of-sync with the mbox.
svn path=/trunk/; revision=9996
Diffstat (limited to 'camel/providers/local/camel-mbox-folder.c')
-rw-r--r-- | camel/providers/local/camel-mbox-folder.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/camel/providers/local/camel-mbox-folder.c b/camel/providers/local/camel-mbox-folder.c index 9db90fb40c..5d0d816d27 100644 --- a/camel/providers/local/camel-mbox-folder.c +++ b/camel/providers/local/camel-mbox-folder.c @@ -255,8 +255,9 @@ mbox_append_message(CamelFolder *folder, CamelMimeMessage * message, const Camel return; fail_write: - camel_exception_setv(ex, CAMEL_EXCEPTION_SYSTEM, - _("Cannot append message to mbox file: %s: %s"), lf->folder_path, strerror(errno)); + camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM, + _("Cannot append message to mbox file: %s: %s"), + lf->folder_path, g_strerror (errno)); if (filter_stream) camel_object_unref(CAMEL_OBJECT(filter_stream)); @@ -271,18 +272,20 @@ fail_write: /* reset the file to original size */ fd = open(lf->folder_path, O_WRONLY, 0600); - if (fd != -1) { ftruncate(fd, mbs->folder_size); close(fd); } - + + /* remove the summary info so we are not out-of-sync with the mbox */ + camel_folder_summary_remove_uid (CAMEL_FOLDER_SUMMARY (mbs), camel_message_info_uid (mi)); + /* and tell the summary its uptodate */ if (stat(lf->folder_path, &st) == 0) { mbs->folder_size = st.st_size; ((CamelFolderSummary *)mbs)->time = st.st_mtime; } - + fail: /* make sure we unlock the folder - before we start triggering events into appland */ camel_local_folder_unlock(lf); |