aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-09 17:57:36 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-09 17:57:36 +0800
commit1156a3b3e88375d4b20574e6602e9965c5600fbc (patch)
treea05924fba8ec90ce9e1dacf332d99f8f3ab591e5 /mail
parentd346244ffb02d4dfae40ffe27aa95acebb2b4cd8 (diff)
downloadgsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar
gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar.gz
gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar.bz2
gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar.lz
gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar.xz
gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.tar.zst
gsoc2013-evolution-1156a3b3e88375d4b20574e6602e9965c5600fbc.zip
Bug #552552 - File/Empty Trash does not expunge maildir folders
Diffstat (limited to 'mail')
-rw-r--r--mail/em-utils.c4
-rw-r--r--mail/mail-tools.c16
2 files changed, 16 insertions, 4 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 76148f70ec..5cd024bec7 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1601,7 +1601,6 @@ em_utils_empty_trash (GtkWidget *parent)
camel_exception_init (&ex);
- /* expunge all remote stores */
accounts = e_get_account_list ();
iter = e_list_get_iterator ((EList *) accounts);
while (e_iterator_is_valid (iter)) {
@@ -1612,8 +1611,7 @@ em_utils_empty_trash (GtkWidget *parent)
provider = camel_provider_get(account->source->url, &ex);
if (provider) {
/* make sure this store is a remote store */
- if (provider->flags & CAMEL_PROVIDER_IS_STORAGE &&
- provider->flags & CAMEL_PROVIDER_IS_REMOTE) {
+ if (provider->flags & CAMEL_PROVIDER_IS_STORAGE) {
mail_empty_trash (account, NULL, NULL);
}
}
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;