[evolution-data-server] Permit all characters but dir_sep in imapx folder names.
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Permit all characters but dir_sep in imapx folder names.
- Date: Thu, 24 Jun 2010 13:02:28 +0000 (UTC)
commit 1bd00cde4783a1c5c32a7beeb660a9a4685501d4
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.
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 3af319a..b1cc853 100644
--- a/camel/providers/imapx/camel-imapx-store.c
+++ b/camel/providers/imapx/camel-imapx-store.c
@@ -751,7 +751,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;
@@ -777,14 +776,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]