Author: cazfi Date: Fri Aug 28 20:24:12 2015 New Revision: 29709 URL: http://svn.gna.org/viewcvs/freeciv?rev=29709&view=rev Log: Fixed user_home_dir() to correctly build up the home dir information again if it has been cleared since previous call. That never happens with current codebase.
See bug #23823 Modified: branches/S2_6/utility/shared.c Modified: branches/S2_6/utility/shared.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_6/utility/shared.c?rev=29709&r1=29708&r2=29709&view=diff ============================================================================== --- branches/S2_6/utility/shared.c (original) +++ branches/S2_6/utility/shared.c Fri Aug 28 20:24:12 2015 @@ -747,10 +747,10 @@ #ifdef AMIGA return "PROGDIR:"; #else /* AMIGA */ - static bool init = FALSE; - - if (!init) { + + if (home_dir == NULL) { char *env = getenv("HOME"); + if (env) { home_dir = fc_strdup(env); log_verbose("HOME is %s", home_dir); @@ -803,7 +803,6 @@ home_dir = NULL; #endif /* WIN32_NATIVE */ } - init = TRUE; } return home_dir; _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits