diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2009-04-13 17:03:19 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2009-04-13 17:03:19 +0800 |
commit | 064ff85b3b8e06a5347b62e5c80c1273875e719a (patch) | |
tree | c6a44f922ea443c1b7d4d4e40f081538f88a5b50 /mail/em-folder-utils.c | |
parent | 6759311c28f02a38fdb9a48f400a0e3c1a496f03 (diff) | |
download | gsoc2013-evolution-064ff85b3b8e06a5347b62e5c80c1273875e719a.tar.gz gsoc2013-evolution-064ff85b3b8e06a5347b62e5c80c1273875e719a.tar.zst gsoc2013-evolution-064ff85b3b8e06a5347b62e5c80c1273875e719a.zip |
Fixes #471083 (bnc) Do not allow deletion of system folders.
Fixes #471083 (bnc)
Do not allow deletion of system folders.
svn path=/trunk/; revision=37517
Diffstat (limited to 'mail/em-folder-utils.c')
-rw-r--r-- | mail/em-folder-utils.c | 10 |
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, |