[evolution-patches] (camel-groupwise) Fixes #313058



hi,

The attached patch fixes
http://bugzilla.gnome.org/show_bug.cgi?id=313058

Thanks,
Vivek Jain
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/ChangeLog,v
retrieving revision 1.92
diff -u -p -r1.92 ChangeLog
--- ChangeLog	16 Aug 2005 04:04:17 -0000	1.92
+++ ChangeLog	17 Aug 2005 10:08:47 -0000
@@ -1,3 +1,9 @@
+2005-08-17 Vivek Jain <jvivek novell com>
+	
+	* camel-groupwise-store.c: (groupwise_create_folder):
+	disallow special folder names only when created at the top level
+	**Fixes #313058
+
 2005-08-16 Vivek Jain <jvivek novell com>
 	
 	* camel-groupwise-folder.c : (groupwise_folder_item_to_msg),
Index: camel-groupwise-store.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/camel/providers/groupwise/camel-groupwise-store.c,v
retrieving revision 1.63
diff -u -p -r1.63 camel-groupwise-store.c
--- camel-groupwise-store.c	16 Aug 2005 09:20:12 -0000	1.63
+++ camel-groupwise-store.c	17 Aug 2005 10:08:48 -0000
@@ -849,19 +849,19 @@ groupwise_create_folder(CamelStore *stor
 	CamelFolderInfo *root = NULL;
 	char *parent_id , *child_container_id;
 	int status;
-	
-	if (groupwise_is_system_folder (folder_name)) {
-		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, NULL);
-		return NULL;
-	}
 
 	if (((CamelOfflineStore *) store)->state == CAMEL_OFFLINE_STORE_NETWORK_UNAVAIL) {
 		camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, _("Cannot create GroupWise folders in offline mode."));
 		return NULL;
 	}
 	
-	if(parent_name == NULL)
+	if(parent_name == NULL) {
 		parent_name = "";
+		if (groupwise_is_system_folder (folder_name)) {
+			camel_exception_set (ex, CAMEL_EXCEPTION_SYSTEM, NULL);
+			return NULL;
+		}
+	}
 
 	if (parent_name && (strlen(parent_name) > 0) ) 
 		parent_id = g_hash_table_lookup (priv->name_hash, parent_name);


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