From 7c81b7cd52c62a848ecd5a6e4f0fea0898064893 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Fri, 20 Jun 2003 05:04:58 +0000 Subject: ** See bug #31745 2003-06-16 Not Zed ** See bug #31745 * providers/imap/camel-imap-store-summary.c (camel_imap_store_summary_namespace_new): Workaround a shell bug - if the namespace has '#' in it, then strip it. svn path=/trunk/; revision=21491 --- camel/providers/imap/camel-imap-store-summary.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/camel/providers/imap/camel-imap-store-summary.c b/camel/providers/imap/camel-imap-store-summary.c index 5ba3f955e2..305bbfc0cd 100644 --- a/camel/providers/imap/camel-imap-store-summary.c +++ b/camel/providers/imap/camel-imap-store-summary.c @@ -364,7 +364,7 @@ camel_imap_store_summary_full_from_path(CamelImapStoreSummary *s, const char *pa CamelImapStoreNamespace *camel_imap_store_summary_namespace_new(CamelImapStoreSummary *s, const char *full_name, char dir_sep) { CamelImapStoreNamespace *ns; - char *p; + char *p, *o, c; int len; ns = g_malloc0(sizeof(*ns)); @@ -374,12 +374,15 @@ CamelImapStoreNamespace *camel_imap_store_summary_namespace_new(CamelImapStoreSu ns->full_name[len] = 0; ns->sep = dir_sep; - p = ns->path = camel_imap_store_summary_full_to_path(s, ns->full_name, dir_sep); - while (*p) { - if (*p == '/') - *p = '.'; - p++; + o = p = ns->path = camel_imap_store_summary_full_to_path(s, ns->full_name, dir_sep); + while ((c = *p++)) { + if (c != '#') { + if (c == '/') + c = '.'; + *o++ = c; + } } + *o = 0; return ns; } -- cgit v1.2.3