diff options
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 = '/'; + } } } |