diff options
Diffstat (limited to 'mail')
-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); |