diff options
author | Peter Williams <peterw@ximian.com> | 2001-08-15 10:48:00 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2001-08-15 10:48:00 +0800 |
commit | 545c3e8a64626dd516d9a5f044b080fea946536a (patch) | |
tree | 6051ea64a7bb49e31e7a55d7b7d66a2adb068d3c /camel/providers/imap | |
parent | 6684b4627d4767f6ea5d2969d70ae6f2cf863a79 (diff) | |
download | gsoc2013-evolution-545c3e8a64626dd516d9a5f044b080fea946536a.tar gsoc2013-evolution-545c3e8a64626dd516d9a5f044b080fea946536a.tar.gz gsoc2013-evolution-545c3e8a64626dd516d9a5f044b080fea946536a.tar.bz2 gsoc2013-evolution-545c3e8a64626dd516d9a5f044b080fea946536a.tar.lz gsoc2013-evolution-545c3e8a64626dd516d9a5f044b080fea946536a.tar.xz gsoc2013-evolution-545c3e8a64626dd516d9a5f044b080fea946536a.tar.zst gsoc2013-evolution-545c3e8a64626dd516d9a5f044b080fea946536a.zip |
Canonicalize store->namespace to end in store->dir_sep, once both values
2001-08-14 Peter Williams <peterw@ximian.com>
* providers/imap/camel-imap-store.c (imap_connect_online):
Canonicalize store->namespace to end in store->dir_sep, once both
values are known. The %F-related code makes this
assumption. Probably fixes a bug reported on the mailing list.
svn path=/trunk/; revision=12040
Diffstat (limited to 'camel/providers/imap')
-rw-r--r-- | camel/providers/imap/camel-imap-store.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c index eb0c61e0f8..1260cb58b2 100644 --- a/camel/providers/imap/camel-imap-store.c +++ b/camel/providers/imap/camel-imap-store.c @@ -646,7 +646,17 @@ imap_connect_online (CamelService *service, CamelException *ex) if (!store->dir_sep) store->dir_sep = '/'; /* Guess */ } - + + /* canonicalize the namespace to end with dir_sep */ + len = strlen (store->namespace); + if (store->namespace[len] != store->dir_sep) { + gchar *tmp; + + tmp = g_strdup_printf ("%s%c", store->namespace, store->dir_sep); + g_free (store->namespace); + store->namespace = tmp; + } + /* Write namespace/separator out */ camel_file_util_encode_string (storeinfo, store->namespace); camel_file_util_encode_uint32 (storeinfo, store->dir_sep); |