aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-store.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-01-19 08:14:42 +0800
committerDan Winship <danw@src.gnome.org>2001-01-19 08:14:42 +0800
commit9c3295326aef917055c1ddc4e58366d193ebf33b (patch)
tree33ee2f63a692f40c9162863e35a54a35ace6332e /camel/camel-store.c
parent4b6e393ab98a7c116db779e8a17d6762210409ef (diff)
downloadgsoc2013-evolution-9c3295326aef917055c1ddc4e58366d193ebf33b.tar.gz
gsoc2013-evolution-9c3295326aef917055c1ddc4e58366d193ebf33b.tar.zst
gsoc2013-evolution-9c3295326aef917055c1ddc4e58366d193ebf33b.zip
More tweaking... skip separator characters after the namespace character.
* camel-store.c (camel_folder_info_build): More tweaking... skip separator characters after the namespace character. (Gets rid of the shell folder registration warning some people have had with IMAP) * providers/imap/camel-imap-store.c (imap_connect): I'm sure there was some clever reason I was storing the flags of the folder in the hash table rather than just "1", but I don't remember what it was now. Anyway, since we only ever test NULL/non-NULL, store 1, since flags is sometimes 0. svn path=/trunk/; revision=7628
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r--camel/camel-store.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 05bffcdd97..5b48299231 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -625,9 +625,12 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
for (i = 0; i < folders->len; i++) {
fi = folders->pdata[i];
if (!strncmp (namespace, fi->full_name, nlen))
- g_hash_table_insert (hash, fi->full_name + nlen, fi);
+ name = fi->full_name + nlen;
else
- g_hash_table_insert (hash, fi->full_name, fi);
+ name = fi->full_name;
+ if (*name == separator)
+ name++;
+ g_hash_table_insert (hash, name, fi);
}
/* Now find parents. */
@@ -637,6 +640,8 @@ camel_folder_info_build (GPtrArray *folders, const char *namespace,
name = fi->full_name + nlen;
else
name = fi->full_name;
+ if (*name == separator)
+ name++;
p = strrchr (name, separator);
if (p) {
pname = g_strndup (name, p - name);