Author: cazfi
Date: Thu Nov 19 01:25:13 2015
New Revision: 30679

URL: http://svn.gna.org/viewcvs/freeciv?rev=30679&view=rev
Log:
Use freeciv_storage_dir() instead of user_home_dir() as the default storage 
location
for modpack installer.

See bug #24092

Modified:
    trunk/tools/mpcmdline.c

Modified: trunk/tools/mpcmdline.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/tools/mpcmdline.c?rev=30679&r1=30678&r2=30679&view=diff
==============================================================================
--- trunk/tools/mpcmdline.c     (original)
+++ trunk/tools/mpcmdline.c     Thu Nov 19 01:25:13 2015
@@ -98,15 +98,10 @@
   }
 
   if (fcmp.inst_prefix == NULL) {
-    const char *home = user_home_dir();
+    fcmp.inst_prefix = freeciv_storage_dir();
 
-    if (home == NULL) {
-      log_error("Cannot determine user home directory");
-    } else {
-      static char pfx_buf[500];
-
-      snprintf(pfx_buf, sizeof(pfx_buf), "%s/.freeciv", home);
-      fcmp.inst_prefix = pfx_buf;
+    if (fcmp.inst_prefix == NULL) {
+      log_error("Cannot determine freeciv storage directory");
     }
   }
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to