+2007-06-26 Murray Cumming <murrayc@murrayc.com>
+
+ * src/modest-init.c: (modest_init_local_folders):
+ For memory-card (or other non local-folders) maildir accounts,
+ always create an Archive folder, so that there is somewhere to put
+ messages. This should be less confusing, because the user does not need
+ to guess that the need to create a folder.
+
2007-06-25 Johannes Schmid <johannes.schmid@openismus.com>
* src/maemo/easysetup/modest-wizard-dialog.c: (init):
gboolean
modest_init_local_folders (const gchar* location_filepath)
{
+ gboolean retval = TRUE;
+
gchar *maildir_path = modest_local_folder_info_get_maildir_path (location_filepath);
if (location_filepath) {
- /* For instance, for memory card, just create the top-level .modest folder: */
+ /* For instance, for memory card, just create the top-level .modest folder
+ * and one "archive" folder (so that messages can be put somewhere):
+ */
+
+ gchar *dir = g_build_filename (maildir_path,
+ "Archive", NULL);
+ const gboolean created = modest_init_one_local_folder (dir);
+ g_free(dir);
+
+ if (!created) {
+ retval = FALSE;
+ }
+
+ #if 0
+ /* Do this if we only create the top-level dir: */
if (g_mkdir_with_parents (maildir_path, 0755) < 0) {
g_printerr ("modest: %s: failed to create %s\n", __FUNCTION__, location_filepath);
- g_free (maildir_path);
- return FALSE;
+ retval = FALSE;
}
+ #endif
}
else {
/* Create each of the standard on-disk folders.
g_free(dir);
if (!created) {
- g_free (maildir_path);
- return FALSE;
+ retval = FALSE;
}
}
}
g_free (maildir_path);
- return TRUE;
+ return retval;
}
/**