diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-10-01 06:57:42 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-10-01 06:57:42 +0800 |
commit | 6122b68bb1c0dad56fda839f6f7b2e90c7ff03ca (patch) | |
tree | 4b333a6eff2ea91b74ed8be1009581869e2b8104 /camel/camel-store.c | |
parent | d70db0f321c04fac994431481880eb4fcdd4772b (diff) | |
download | gsoc2013-evolution-6122b68bb1c0dad56fda839f6f7b2e90c7ff03ca.tar.gz gsoc2013-evolution-6122b68bb1c0dad56fda839f6f7b2e90c7ff03ca.tar.zst gsoc2013-evolution-6122b68bb1c0dad56fda839f6f7b2e90c7ff03ca.zip |
Fixes bug #31456.
2002-09-30 Jeffrey Stedfast <fejj@ximian.com>
Fixes bug #31456.
* providers/imap/camel-imap-store.c (imap_connect_online): Don't
LSUB "" "*", instead get both an LSUB containing the subfolders of
the namespace and an LSUB of INBOX (assuming namespace was
non-empty). This fix really has nothing to do with bug #31456 but
is what should have been done in the first place.
(parse_list_response_as_folder_info): Simplify a tad and strip
extra leading /'s from fi->path.
(imap_build_folder_info): Strip extra leading /'s from fi->path.
* camel-store.c (camel_folder_info_build): Don't strip the
namespace from the fi->full_name when hashing or creating fake
parent folder-infos. Fixes a bug I found while trying to reproduce
bug #31456.
(camel_folder_info_build_path): Strip off extra leading dir_sep
chars from the path.
svn path=/trunk/; revision=18273
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c index f7ae7cba78..43528a8353 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -818,13 +818,19 @@ camel_folder_info_free (CamelFolderInfo *fi) void camel_folder_info_build_path (CamelFolderInfo *fi, char separator) { - fi->path = g_strdup_printf("/%s", fi->full_name); + const char *full_name; + char *p; + + full_name = fi->full_name; + while (*full_name == separator) + full_name++; + + fi->path = g_strdup_printf ("/%s", full_name); if (separator != '/') { - char *p; - - p = fi->path; - while ((p = strchr (p, separator))) - *p = '/'; + for (p = fi->path; *p; p++) { + if (*p == separator) + *p = '/'; + } } } |