disallow special folder names only when created at the top level **Fixes
authorVivek Jain <jvivek@novell.com>
Thu, 18 Aug 2005 06:03:02 +0000 (06:03 +0000)
committerJain Vivek <jvivek@src.gnome.org>
Thu, 18 Aug 2005 06:03:02 +0000 (06:03 +0000)
2005-08-18 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

camel/providers/groupwise/ChangeLog
camel/providers/groupwise/camel-groupwise-store.c

index 471d1d3..c08d4ae 100644 (file)
@@ -1,3 +1,9 @@
+2005-08-18 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-17  Parthasarathi Susarla <sparthasarathi@novell.com>
        
        ** see bug #310956
index a27e165..6803db9 100644 (file)
@@ -852,19 +852,19 @@ groupwise_create_folder(CamelStore *store,
        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);