summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2010-06-24 00:24:58 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-06-28 13:42:49 +0100
commitcb34a2e0361affb5994a9b5b72c8c739e29ceee9 (patch)
tree1d6b7ced9bc673cc3c7b70ef47021666d2c0e785
parentdad074d2c676646550800a52091c87ffa8be8081 (diff)
downloadevolution-data-server-cb34a2e0361affb5994a9b5b72c8c739e29ceee9.tar.gz
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)
-rw-r--r--camel/providers/imapx/camel-imapx-store.c9
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 ae7aebce4..72ec38a44 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;
}