diff options
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r-- | mail/mail-tools.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c index d5966a8993..c6cb3c9685 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -266,10 +266,16 @@ mail_tool_uri_to_folder (const char *uri, CamelException *ex) if (store) { char *name; - if (url->path && *url->path) - name = url->path + 1; - else - name = ""; + /* if we have a fragment, then the path is actually used by the store, + so the fragment is the path to the folder instead */ + if (url->fragment) { + name = url->fragment; + } else { + if (url->path && *url->path) + name = url->path + 1; + else + name = ""; + } if (offset) folder = camel_store_get_trash (store, ex); |