diff options
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index 8da0a17c3c..420ae587af 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -1107,11 +1107,25 @@ mail_config_get_sources (void) char * mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix) { + CamelService *service = CAMEL_SERVICE (folder->parent_store); char *url, *filename; - - url = camel_url_to_string (CAMEL_SERVICE (folder->parent_store)->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); + + /* This is the way it is for backward compatibility with + * the way it was, not because it's necessarily a good thing. + */ + + url = camel_url_to_string (service->url, CAMEL_URL_HIDE_PASSWORD | CAMEL_URL_HIDE_PARAMS); + + /* Really we want to check CAMEL_IS_LOCAL_FOLDER here, but we + * can't do that. + */ + if (service->provider->flags & CAMEL_PROVIDER_IS_REMOTE) { + char *store_url = url; + url = g_strdup_printf ("%s/%s", store_url, folder->full_name); + g_free (store_url); + } e_filename_make_safe (url); - + filename = g_strdup_printf ("%s/config/%s%s", evolution_dir, prefix, url); g_free (url); |