aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap/camel-imap-store.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/providers/imap/camel-imap-store.c')
-rw-r--r--camel/providers/imap/camel-imap-store.c12
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);