diff options
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index fc8fa7203e..b8d3058181 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -550,6 +550,22 @@ mail_config_add_news (MailConfigService *news) config->news = g_slist_append (config->news, new_news); } +char * +mail_config_folder_to_cachename(CamelFolder *folder, const char *prefix) +{ + char *url, *p, *filename; + + url = camel_url_to_string(CAMEL_SERVICE(folder->parent_store)->url, FALSE); + for (p = url; *p; p++) { + if (!isprint((unsigned char)*p) || strchr(" /'\"`&();|<>${}!", *p)) + *p = '_'; + } + + filename = g_strdup_printf("%s/config/%s%s", evolution_dir, prefix, url); + g_free(url); + return filename; +} + |