diff options
author | Not Zed <NotZed@Ximian.com> | 2004-09-27 13:31:06 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-09-27 13:31:06 +0800 |
commit | 4502cb94c238527c9d08512ea308a4184e6b79cc (patch) | |
tree | 589ce27eed96e0a873383f37e4c4fc141a1524fb /mail/mail-ops.c | |
parent | 140a2de7885a0e0e360125bfc1305da01eb68f6a (diff) | |
download | gsoc2013-evolution-4502cb94c238527c9d08512ea308a4184e6b79cc.tar.gz gsoc2013-evolution-4502cb94c238527c9d08512ea308a4184e6b79cc.tar.zst gsoc2013-evolution-4502cb94c238527c9d08512ea308a4184e6b79cc.zip |
** See bug #63521.
2004-09-21 Not Zed <NotZed@Ximian.com>
** See bug #63521.
* mail-ops.c (fetch_mail_fetch): delete all the messages on the
server if we're not in keep on server mode and everything worked.
uncancel ourselves before saving the cache uid since it could be
cancelled otherwise.
svn path=/trunk/; revision=27390
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 013eb4a184..51de559c8e 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -318,16 +318,27 @@ fetch_mail_fetch (struct _mail_msg *mm) fm->cache = cache; em_filter_folder_element_filter (mm); + /* need to uncancel so writes/etc. don't fail */ + if (mm->ex.id == CAMEL_EXCEPTION_USER_CANCEL) + camel_operation_uncancel(NULL); + /* save the cache of uids that we've just downloaded */ camel_uid_cache_save (cache); + } - /* 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); + if (fm->delete && mm->ex.id == CAMEL_EXCEPTION_NONE) { + /* not keep on server - just delete all the actual messages on the server */ + for (i=0;i<folder_uids->len;i++) { + d(printf("force delete uid '%s'\n", (char *)folder_uids->pdata[i])); + camel_folder_delete_message(folder, folder_uids->pdata[i]); + } + } + if (fm->delete || cache_uids) { /* expunge messages (downloaded so far) */ camel_folder_sync(folder, fm->delete, NULL); } + camel_uid_cache_destroy (cache); camel_folder_free_uids (folder, folder_uids); } else { |