diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-09 17:57:36 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-09 17:57:36 +0800 |
commit | 1156a3b3e88375d4b20574e6602e9965c5600fbc (patch) | |
tree | a05924fba8ec90ce9e1dacf332d99f8f3ab591e5 /mail/mail-tools.c | |
parent | d346244ffb02d4dfae40ffe27aa95acebb2b4cd8 (diff) | |
download | gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar.gz gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar.zst gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.zip |
Bug #552552 - File/Empty Trash does not expunge maildir folders
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c index a19c3dedb4..4c21a6db4c 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -76,6 +76,20 @@ mail_tool_get_inbox (const gchar *url, CamelException *ex) return folder; } +static gboolean +is_local_provider (CamelStore *store) +{ + CamelProvider *provider; + + g_return_val_if_fail (store != NULL, FALSE); + + provider = camel_service_get_provider (CAMEL_SERVICE (store)); + + g_return_val_if_fail (provider != NULL, FALSE); + + return (provider->flags & CAMEL_PROVIDER_IS_LOCAL) != 0; +} + CamelFolder * mail_tool_get_trash (const gchar *url, gint connect, CamelException *ex) { @@ -90,7 +104,7 @@ mail_tool_get_trash (const gchar *url, gint connect, CamelException *ex) if (!store) return NULL; - if (connect || ((CamelService *) store)->status == CAMEL_SERVICE_CONNECTED) + if (connect || ((CamelService *) store)->status == CAMEL_SERVICE_CONNECTED || is_local_provider (store)) trash = camel_store_get_trash (store, ex); else trash = NULL; |