[evolution/webkit] Fixes a crash while creating VeeFolders at the root level.



commit c9cd1370e50709b9a829c8fb5c0bfb56c5cca4b9
Author: Chenthill Palanisamy <pchenthill novell com>
Date:   Tue Jun 7 19:05:03 2011 +0530

    Fixes a crash while creating VeeFolders at the root level.

 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 27ba1c1..589729b 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]