From b693cbeb05a95fd893ef6053548c7aa7300c999a Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 28 Aug 2008 07:31:43 +0000 Subject: ** Fix for bug #509647 2008-08-28 Milan Crha ** Fix for bug #509647 * em-folder-utils.c: (emft_copy_folders__exec): * mail-ops.c: (fetch_mail_exec), (send_queue_exec): Do not expunge folder when something goes wrong. svn path=/trunk/; revision=36143 --- mail/mail-ops.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'mail/mail-ops.c') diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 705e43898b..00eebd201a 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -337,7 +337,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m) } } - if (fm->delete || cache_uids) { + if ((fm->delete || cache_uids) && !camel_exception_is_set (&fm->base.ex)) { /* expunge messages (downloaded so far) */ camel_folder_sync(folder, fm->delete, NULL); } @@ -772,8 +772,10 @@ send_queue_exec (struct _send_queue_msg *m) camel_folder_free_uids (m->queue, uids); g_ptr_array_free (send_uids, TRUE); - camel_folder_sync (m->queue, TRUE, &ex); - camel_exception_clear (&ex); + if (j <= 0 && !camel_exception_is_set (&m->base.ex)) { + camel_folder_sync (m->queue, TRUE, &ex); + camel_exception_clear (&ex); + } if (sent_folder) { camel_folder_sync (sent_folder, FALSE, &ex); -- cgit v1.2.3