[evolution-data-server/gnome-2-30] Permit all characters but dir_sep in imapx folder names.



commit cb34a2e0361affb5994a9b5b72c8c739e29ceee9
Author: David Woodhouse <David Woodhouse intel com>
Date:   Thu Jun 24 00:24:58 2010 +0100

    Permit all characters but dir_sep in imapx folder names.
    
    There's no point in preventing people from creating folders with %#* in the
    names; they can always create them from elsewhere. Or, AFAICT, just create
    them using evo with a 'permitted' name and then rename them to contain the
    'offending' characters.
    (cherry picked from commit 1bd00cde4783a1c5c32a7beeb660a9a4685501d4)

 camel/providers/imapx/camel-imapx-store.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c
index ae7aebc..72ec38a 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -714,7 +714,6 @@ imapx_rename_folder (CamelStore *store, const gchar *old, const gchar *new, Came
 static CamelFolderInfo *
 imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *folder_name, CamelException *ex)
 {
-	const gchar *c;
 	CamelStoreInfo *si;
 	CamelIMAPXStoreNamespace *ns;
 	CamelIMAPXStore *istore = (CamelIMAPXStore *) store;
@@ -740,14 +739,10 @@ imapx_create_folder (CamelStore *store, const gchar *parent_name, const gchar *f
 	else
 		dir_sep = '/';
 
-	c = folder_name;
-	while (*c && *c != dir_sep && !strchr ("#%*", *c))
-		c++;
-
-	if (*c != '\0') {
+	if (strchr(folder_name, dir_sep)) {
 		camel_exception_setv (ex, CAMEL_EXCEPTION_FOLDER_INVALID_PATH,
 				      _("The folder name \"%s\" is invalid because it contains the character \"%c\""),
-				      folder_name, *c);
+				      folder_name, dir_sep);
 		return NULL;
 	}
 



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