aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-03-03 16:44:48 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-03-03 16:44:48 +0800
commit0358c73b0228f3dbf0e79d2bb3242db9d1f69942 (patch)
treec632705027dd5c54a136a873060f25e58d5e856a /mail/mail-ops.c
parent4e8aee0a768987f20277e6c3dabdfa6b52df75ef (diff)
downloadgsoc2013-evolution-0358c73b0228f3dbf0e79d2bb3242db9d1f69942.tar
gsoc2013-evolution-0358c73b0228f3dbf0e79d2bb3242db9d1f69942.tar.gz
gsoc2013-evolution-0358c73b0228f3dbf0e79d2bb3242db9d1f69942.tar.bz2
gsoc2013-evolution-0358c73b0228f3dbf0e79d2bb3242db9d1f69942.tar.lz
gsoc2013-evolution-0358c73b0228f3dbf0e79d2bb3242db9d1f69942.tar.xz
gsoc2013-evolution-0358c73b0228f3dbf0e79d2bb3242db9d1f69942.tar.zst
gsoc2013-evolution-0358c73b0228f3dbf0e79d2bb3242db9d1f69942.zip
** See bug #53738.
2004-03-03 Not Zed <NotZed@Ximian.com> ** See bug #53738. * mail-ops.c (fetch_mail_fetch): if we've been cancelled, uncancel so syncing can work. and always sync the folder (with expunge if deleting). svn path=/trunk/; revision=24948
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 2b338bb1ee..372d4c2280 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -303,21 +303,13 @@ fetch_mail_fetch (struct _mail_msg *mm)
/* save the cache of uids that we've just downloaded */
camel_uid_cache_save (cache);
-
- /* if we are deleting off the server and no exception occured
- * then iterate through the folder uids and mark them all
- * for deletion. */
- if (fm->delete && !camel_exception_is_set (&mm->ex)) {
- camel_folder_freeze (folder);
-
- for (i = 0; i < folder_uids->len; i++)
- camel_folder_delete_message (folder, folder_uids->pdata[i]);
-
- /* sync and expunge */
- camel_folder_sync (folder, TRUE, &mm->ex);
-
- camel_folder_thaw (folder);
- }
+
+ /* if we don't do this, no operations on the folder will work */
+ if (mm->ex.id == CAMEL_EXCEPTION_USER_CANCEL)
+ camel_operation_uncancel(NULL);
+
+ /* expunge messages (downloaded so far) */
+ camel_folder_sync(folder, fm->delete, NULL);
}
camel_uid_cache_destroy (cache);
camel_folder_free_uids (folder, folder_uids);