diff options
author | Chenthill Palanisamy <pchenthill@novell.com> | 2011-06-07 21:35:03 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchenthill@novell.com> | 2011-06-07 21:35:03 +0800 |
commit | a6e485712f2785680ee2dd2084a9d4d70152ffec (patch) | |
tree | d262ff384a4ff5f43a91336e7ca166c89964a5b9 | |
parent | 3b10a2700b8a926d1021ef4acc78fe4df9fc5e72 (diff) | |
download | gsoc2013-evolution-a6e485712f2785680ee2dd2084a9d4d70152ffec.tar.gz gsoc2013-evolution-a6e485712f2785680ee2dd2084a9d4d70152ffec.tar.zst gsoc2013-evolution-a6e485712f2785680ee2dd2084a9d4d70152ffec.zip |
Fixes a crash while creating VeeFolders at the root level.
-rw-r--r-- | mail/em-folder-utils.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 27ba1c17e8..589729bcca 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -594,9 +594,15 @@ em_folder_utils_create_folder (GtkWindow *parent, /* HACK: we need to create vfolders using the vfolder editor */ if (CAMEL_IS_VEE_STORE (store)) { EFilterRule *rule; + const gchar *skip_slash; + + if (*folder_name == '/') + skip_slash = folder_name + 1; + else + skip_slash = folder_name; rule = em_vfolder_rule_new (backend); - e_filter_rule_set_name (rule, folder_name); + e_filter_rule_set_name (rule, skip_slash); vfolder_gui_add_rule (EM_VFOLDER_RULE (rule)); } else { AsyncContext *context; |