aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-folder-utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-folder-utils.c')
-rw-r--r--mail/em-folder-utils.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index f3a839f926..56111abe6c 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -61,6 +61,7 @@
#include "mail-config.h"
#include "mail-component.h"
#include "mail-vfolder.h"
+#include "mail-folder-cache.h"
#include "em-utils.h"
#include "em-popup.h"
@@ -401,6 +402,8 @@ em_folder_utils_delete_folder (CamelFolder *folder)
{
CamelStore *local;
GtkWidget *dialog;
+ char *uri;
+ int flags = 0;
local = mail_component_peek_local_store (NULL);
@@ -409,7 +412,14 @@ em_folder_utils_delete_folder (CamelFolder *folder)
em_utils_show_error_silent (dialog);
return;
}
+
+ if (mail_folder_cache_get_folder_info_flags (folder, &flags) && (flags & CAMEL_FOLDER_SYSTEM))
+ {
+ e_error_run(NULL,"mail:no-delete-special-folder", folder->name, NULL);
+ return;
+ }
+ g_free (uri);
camel_object_ref (folder);
dialog = e_error_new(NULL,