From a6e485712f2785680ee2dd2084a9d4d70152ffec Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Tue, 7 Jun 2011 19:05:03 +0530 Subject: Fixes a crash while creating VeeFolders at the root level. --- mail/em-folder-utils.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mail') 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; -- cgit