diff options
author | Milan Crha <mcrha@redhat.com> | 2011-11-09 22:26:05 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-11-09 22:26:05 +0800 |
commit | 1dc40cdae4e01e2377160acc5b18b3a1e3a485b8 (patch) | |
tree | 4309d2ab9b2221fc93e1d75084d32be546cfbc09 | |
parent | 8dd9c2a86b38a8191503f4c5dcd980018db75095 (diff) | |
download | gsoc2013-evolution-1dc40cdae4e01e2377160acc5b18b3a1e3a485b8.tar.gz gsoc2013-evolution-1dc40cdae4e01e2377160acc5b18b3a1e3a485b8.tar.zst gsoc2013-evolution-1dc40cdae4e01e2377160acc5b18b3a1e3a485b8.zip |
Bug #662929 - POP3 prevents expunge of local Inbox in offline
-rw-r--r-- | mail/mail-ops.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 8bdb329f36..24a494ddac 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1410,7 +1410,26 @@ expunge_pop3_stores (CamelFolder *expunging, account->source && account->source->url && g_str_has_prefix (account->source->url, "pop://")) { CamelFolder *folder; - gboolean any_found = FALSE; + CamelService *service; + CamelSettings *settings; + gboolean any_found = FALSE, delete_expunged = FALSE, keep_on_server = FALSE; + + service = camel_session_get_service (CAMEL_SESSION (session), account->uid); + if (!CAMEL_IS_STORE (service)) + continue; + + settings = camel_service_get_settings (service); + if (!settings) + continue; + + g_object_get ( + settings, + "delete-expunged", &delete_expunged, + "keep-on-server", &keep_on_server, + NULL); + + if (!keep_on_server || !delete_expunged) + continue; folder = e_mail_session_get_inbox_sync ( session, account->uid, cancellable, error); |