X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-init.c;h=b2e91e9ca341bc42b733a29873666c42c8e24cc1;hb=f65b8ca3f080a85a07e85dcbd73cd92116c82d74;hp=983cd3dbc5e0d478dc36d0e29506f0a9cef8a501;hpb=e52ce04005cec191d342b5e6049876297593f639;p=modest diff --git a/src/modest-init.c b/src/modest-init.c index 983cd3d..b2e91e9 100644 --- a/src/modest-init.c +++ b/src/modest-init.c @@ -480,7 +480,7 @@ gboolean modest_init_one_local_folder (gchar *maildir_path) */ gboolean modest_init_local_folders (const gchar* location_filepath) -{ +{ gboolean retval = TRUE; gchar *maildir_path = modest_local_folder_info_get_maildir_path (location_filepath); @@ -495,18 +495,10 @@ modest_init_local_folders (const gchar* location_filepath) 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); + if (!created) { retval = FALSE; } - #endif } else { /* Create each of the standard on-disk folders. @@ -515,16 +507,16 @@ modest_init_local_folders (const gchar* location_filepath) for (i = 0; i != G_N_ELEMENTS(LOCAL_FOLDERS); ++i) { gchar *dir = g_build_filename (maildir_path, modest_local_folder_info_get_type_name(LOCAL_FOLDERS[i]), - NULL); + NULL); const gboolean created = modest_init_one_local_folder (dir); g_free(dir); - + if (!created) { retval = FALSE; } } } - + g_free (maildir_path); return retval; } @@ -600,8 +592,8 @@ init_i18n (void) setenv ("LC_MESSAGES", "en_GB", 1); } else { gchar *language = g_strdup_printf ("%s:en_GB", lc_messages); - setenv ("LANGUAGE", language, 1); - g_free (language); + setenv ("LC_MESSAGES", language, 1); + g_free (language); } /* end of little trick */