Fixes NB#116993, messages sent with Yahoo! are not moved to Outbox
authorSergio Villar Senín <svillar@igalia.com>
Thu, 14 May 2009 18:19:49 +0000 (20:19 +0200)
committerSergio Villar Senín <svillar@igalia.com>
Thu, 14 May 2009 18:19:49 +0000 (20:19 +0200)
Actually the problem was that the Camel maildir provider does not allow character "!" in the folder name. So the outbox for that account could not be created

src/modest-local-folder-info.c

index 7f6a08c..0647f58 100644 (file)
@@ -113,11 +113,17 @@ gchar*
 modest_per_account_local_outbox_folder_info_get_maildir_path (const gchar* account_name)
 {
        /* This directory should contain an "outbox" child directory: */
 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;
+
+       escaped = g_uri_escape_string (account_name, NULL, FALSE);
+       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*
 }
 
 gchar*