[Commits] [SCM] claws branch, master, updated. 3.14.1-24-g25bab9d

claws at claws-mail.org claws at claws-mail.org
Mon Nov 28 13:50:37 CET 2016


The branch, master has been updated
       via  25bab9dcc94a2d3bd576ddff28ebc045581f2fb4 (commit)
      from  08916bffe4b3d42199b11060a49a812a9a7817f2 (commit)

Summary of changes:
 src/main.c |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)


- Log -----------------------------------------------------------------
commit 25bab9dcc94a2d3bd576ddff28ebc045581f2fb4
Author: Paul <paul at claws-mail.org>
Date:   Mon Nov 28 12:50:32 2016 +0000

    on first run, use --alternate-config-dir (if set) on prefs migration
    
    prevents useless creation of ~/.claws-mail directory

diff --git a/src/main.c b/src/main.c
index ee58a3f..3d2ecce 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1127,7 +1127,7 @@ int main(int argc, char *argv[])
 #endif
 	
 	/* no config dir exists. See if we can migrate an old config. */
-	if (!is_dir_exist(RC_DIR)) {
+	if (!is_dir_exist(get_rc_dir())) {
 		prefs_destroy_cache();
 		gboolean r = FALSE;
 		
@@ -1136,30 +1136,30 @@ int main(int argc, char *argv[])
 		 * and migration succeeded, and FALSE otherwise.
 		 */
 		if (is_dir_exist(OLD_GTK2_RC_DIR)) {
-			r = migrate_old_config(OLD_GTK2_RC_DIR, RC_DIR,
+			r = migrate_old_config(OLD_GTK2_RC_DIR, get_rc_dir(),
 					       g_strconcat("Sylpheed-Claws 2.6.0 ", _("(or older)"), NULL));
 			asked_for_migration = TRUE;
 		} else if (is_dir_exist(OLDER_GTK2_RC_DIR)) {
-			r = migrate_old_config(OLDER_GTK2_RC_DIR, RC_DIR,
+			r = migrate_old_config(OLDER_GTK2_RC_DIR, get_rc_dir(),
 					       g_strconcat("Sylpheed-Claws 1.9.15 ",_("(or older)"), NULL));
 			asked_for_migration = TRUE;
 		} else if (is_dir_exist(OLD_GTK1_RC_DIR)) {
-			r = migrate_old_config(OLD_GTK1_RC_DIR, RC_DIR,
+			r = migrate_old_config(OLD_GTK1_RC_DIR, get_rc_dir(),
 					       g_strconcat("Sylpheed-Claws 1.0.5 ",_("(or older)"), NULL));
 			asked_for_migration = TRUE;
 		} else if (is_dir_exist(SYLPHEED_RC_DIR)) {
-			r = migrate_old_config(SYLPHEED_RC_DIR, RC_DIR, "Sylpheed");
+			r = migrate_old_config(SYLPHEED_RC_DIR, get_rc_dir(), "Sylpheed");
 			asked_for_migration = TRUE;
 		}
 		
 		/* If migration failed or the user didn't want to do it,
 		 * we create a new one (and we'll hit wizard later). 
 		 */
-		if (r == FALSE && !is_dir_exist(RC_DIR)) {
+		if (r == FALSE && !is_dir_exist(get_rc_dir())) {
 #ifdef G_OS_UNIX
-			if (copy_dir(SYSCONFDIR "/skel/.claws-mail", RC_DIR) < 0) {
+			if (copy_dir(SYSCONFDIR "/skel/.claws-mail", get_rc_dir()) < 0) {
 #endif
-				if (!is_dir_exist(RC_DIR) && make_dir(RC_DIR) < 0) {
+				if (!is_dir_exist(get_rc_dir()) && make_dir(get_rc_dir()) < 0) {
 #ifdef G_OS_WIN32
 					win32_close_log();
 #endif

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list