From 1dc40cdae4e01e2377160acc5b18b3a1e3a485b8 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 9 Nov 2011 15:26:05 +0100 Subject: Bug #662929 - POP3 prevents expunge of local Inbox in offline --- mail/mail-ops.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'mail') 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); -- cgit