aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-12-05 00:17:02 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-12-05 00:17:02 +0800
commitd4b7008db3236c19b7fa71b3ab4a374030f5574d (patch)
tree9c798c065250e0446f1cb587a28ab19e52f21326
parent200071108fa97ea128657539bdcf86f64e1ac83b (diff)
downloadgsoc2013-evolution-d4b7008db3236c19b7fa71b3ab4a374030f5574d.tar
gsoc2013-evolution-d4b7008db3236c19b7fa71b3ab4a374030f5574d.tar.gz
gsoc2013-evolution-d4b7008db3236c19b7fa71b3ab4a374030f5574d.tar.bz2
gsoc2013-evolution-d4b7008db3236c19b7fa71b3ab4a374030f5574d.tar.lz
gsoc2013-evolution-d4b7008db3236c19b7fa71b3ab4a374030f5574d.tar.xz
gsoc2013-evolution-d4b7008db3236c19b7fa71b3ab4a374030f5574d.tar.zst
gsoc2013-evolution-d4b7008db3236c19b7fa71b3ab4a374030f5574d.zip
Properly handle the case where the namespace is "". Fixes bug #34975
2002-12-04 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store-summary.c (camel_imap_store_summary_add_from_full): Properly handle the case where the namespace is "". Fixes bug #34975 svn path=/trunk/; revision=19002
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-store-summary.c11
-rw-r--r--camel/providers/imap/camel-imap-store.c2
3 files changed, 14 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index e9524dad1b..9db9d5ec0f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2002-12-04 Jeffrey Stedfast <fejj@ximian.com>
+
+ * providers/imap/camel-imap-store-summary.c
+ (camel_imap_store_summary_add_from_full): Properly handle the case
+ where the namespace is "". Fixes bug #34975
+
2002-12-03 Jeffrey Stedfast <fejj@ximian.com>
* broken-date-parser.c (get_tzone): Fixed to not get false
diff --git a/camel/providers/imap/camel-imap-store-summary.c b/camel/providers/imap/camel-imap-store-summary.c
index ce7f189a3a..5ba3f955e2 100644
--- a/camel/providers/imap/camel-imap-store-summary.c
+++ b/camel/providers/imap/camel-imap-store-summary.c
@@ -318,9 +318,14 @@ camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const char *ful
} else {
if (full_name[len] == ns->sep)
len++;
+
prefix = camel_imap_store_summary_full_to_path(s, full_name+len, ns->sep);
- pathu8 = g_strdup_printf("%s/%s", ns->path, prefix);
- g_free(prefix);
+ if (*ns->path) {
+ pathu8 = g_strdup_printf ("%s/%s", ns->path, prefix);
+ g_free (prefix);
+ } else {
+ pathu8 = prefix;
+ }
}
d(printf(" (pathu8 = '%s')", pathu8));
} else {
@@ -343,7 +348,6 @@ camel_imap_store_summary_add_from_full(CamelImapStoreSummary *s, const char *ful
char *
camel_imap_store_summary_full_from_path(CamelImapStoreSummary *s, const char *path)
{
- CamelImapStoreInfo *si;
CamelImapStoreNamespace *ns;
char *name = NULL;
@@ -362,7 +366,6 @@ CamelImapStoreNamespace *camel_imap_store_summary_namespace_new(CamelImapStoreSu
CamelImapStoreNamespace *ns;
char *p;
int len;
- GString *tmp;
ns = g_malloc0(sizeof(*ns));
ns->full_name = g_strdup(full_name);
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 20352ac80b..0fba62fe36 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -2140,7 +2140,7 @@ get_folders_online (CamelImapStore *imap_store, const char *pattern,
g_hash_table_destroy(present);
}
-#if 1
+#if 0
static void
dumpfi(CamelFolderInfo *fi)
{