aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 02d6f68cfe..2e67281670 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -240,6 +240,14 @@ mail_config_folder_to_cachename (CamelFolder *folder, const gchar *prefix)
const gchar *config_dir;
config_dir = mail_session_get_config_dir ();
+
+ basename = g_build_filename (config_dir, "folders", NULL);
+ if (!g_file_test (basename, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
+ /* create the folder if does not exist */
+ g_mkdir_with_parents (basename, 0700);
+ }
+ g_free (basename);
+
folder_uri = e_mail_folder_uri_from_folder (folder);
e_filename_make_safe (folder_uri);
basename = g_strdup_printf ("%s%s", prefix, folder_uri);