Author: cazfi Date: Fri Aug 28 20:24:20 2015 New Revision: 29710 URL: http://svn.gna.org/viewcvs/freeciv?rev=29710&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_5/utility/shared.c Modified: branches/S2_5/utility/shared.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/utility/shared.c?rev=29710&r1=29709&r2=29710&view=diff ============================================================================== --- branches/S2_5/utility/shared.c (original) +++ branches/S2_5/utility/shared.c Fri Aug 28 20:24:20 2015 @@ -745,10 +745,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); @@ -801,7 +801,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