If we have a namespace of "", then always match any path.
authorNot Zed <NotZed@Ximian.com>
Fri, 22 Nov 2002 03:12:10 +0000 (03:12 +0000)
committerMichael Zucci <zucchi@src.gnome.org>
Fri, 22 Nov 2002 03:12:10 +0000 (03:12 +0000)
2002-11-21  Not Zed  <NotZed@Ximian.com>

        * providers/imap/camel-imap-store-summary.c
        (camel_imap_store_summary_namespace_find_path): If we have a
        namespace of "", then always match any path.
        (camel_imap_store_summary_namespace_find_full): Same, for full
        names. Should address #33309 & friends.

camel/ChangeLog
camel/providers/imap/camel-imap-store-summary.c

index f219e9d..d391317 100644 (file)
@@ -1,3 +1,11 @@
+2002-11-21  Not Zed  <NotZed@Ximian.com>
+
+       * providers/imap/camel-imap-store-summary.c
+       (camel_imap_store_summary_namespace_find_path): If we have a
+       namespace of "", then always match any path.
+       (camel_imap_store_summary_namespace_find_full): Same, for full
+       names. Should address #33309 & friends.
+
 2002-11-19  Radek Doulik  <rodo@ximian.com>
 
        * camel-mime-filter-tohtml.c (html_convert): added
index ed6e539..ce7f189 100644 (file)
@@ -401,8 +401,9 @@ camel_imap_store_summary_namespace_find_path(CamelImapStoreSummary *s, const cha
        ns = s->namespace;
        while (ns) {
                len = strlen(ns->path);
-               if (strncmp(ns->path, path, len) == 0
-                   && (path[len] == '/' || path[len] == 0))
+               if (len == 0
+                   || (strncmp(ns->path, path, len) == 0
+                       && (path[len] == '/' || path[len] == 0)))
                        break;
                ns = NULL;
        }
@@ -422,8 +423,9 @@ camel_imap_store_summary_namespace_find_full(CamelImapStoreSummary *s, const cha
        while (ns) {
                len = strlen(ns->full_name);
                d(printf("find_full: comparing namespace '%s' to name '%s'\n", ns->full_name, full));
-               if (strncmp(ns->full_name, full, len) == 0
-                   && (full[len] == ns->sep || full[len] == 0))
+               if (len == 0
+                   || (strncmp(ns->full_name, full, len) == 0
+                       && (full[len] == ns->sep || full[len] == 0)))
                        break;
                ns = NULL;
        }