X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-local-folder-info.c;h=d0bcb755a2b037e634dab43f260023222e28b7c4;hp=c818cca40f22d6473d2533ca19642beac15c24f6;hb=12a672c559d983c4e49a7e4054ee14c0177ecb1c;hpb=b70734073cfc2ac74c63fa8e299d97cab7df7962 diff --git a/src/modest-local-folder-info.c b/src/modest-local-folder-info.c index c818cca..d0bcb75 100644 --- a/src/modest-local-folder-info.c +++ b/src/modest-local-folder-info.c @@ -30,6 +30,7 @@ #include #include /* strcmp */ #include +#include #include typedef struct { @@ -112,11 +113,22 @@ gchar* modest_per_account_local_outbox_folder_info_get_maildir_path (const gchar* account_name) { /* This directory should contain an "outbox" child directory: */ - return g_build_filename (g_get_home_dir(), - MODEST_DIR, - MODEST_PER_ACCOUNT_LOCAL_OUTBOX_FOLDERS_MAILDIR, - account_name, - NULL); + gchar *escaped, *filename; + +#if GLIB_CHECK_VERSION(2, 16, 0) + escaped = g_uri_escape_string (account_name, NULL, FALSE); +#else + /* TODO: escape without calling glib */ + escaped = g_strdup (account_name); +#endif + filename = g_build_filename (g_get_home_dir(), + MODEST_DIR, + MODEST_PER_ACCOUNT_LOCAL_OUTBOX_FOLDERS_MAILDIR, + escaped, + NULL); + g_free (escaped); + + return filename; } gchar*