From 588e18f2023cf8be70efba89e85cb2dc16ee99a0 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 18 Jun 2001 15:46:11 +0000 Subject: If we have a fragment in the url, use that as the folder name, and not the 2001-06-14 Not Zed * mail-tools.c (mail_tool_uri_to_folder): If we have a fragment in the url, use that as the folder name, and not the path component. 2001-06-13 Not Zed * component-factory.c (mail_load_storages): Added temp hack to let spool providers show up in the list. svn path=/trunk/; revision=10263 --- mail/mail-tools.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mail/mail-tools.c') 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); -- cgit