Author: cazfi
Date: Fri May 13 18:12:07 2016
New Revision: 32689

URL: http://svn.gna.org/viewcvs/freeciv?rev=32689&view=rev
Log:
Properly escape storage path on compiler commandline

See bug #24659

Modified:
    trunk/configure.ac

Modified: trunk/configure.ac
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/configure.ac?rev=32689&r1=32688&r2=32689&view=diff
==============================================================================
--- trunk/configure.ac  (original)
+++ trunk/configure.ac  Fri May 13 18:12:07 2016
@@ -739,6 +739,7 @@
     HOST_PATH_SEPARATOR=";"
     HOST_DIR_SEPARATOR="\\"
 
+    FREECIV_STORAGE_DIR_ESC=$(echo $FREECIV_STORAGE_DIR | $SED 
's,/,\\\\\\\\,g')
     FREECIV_STORAGE_DIR=$(echo $FREECIV_STORAGE_DIR | $SED 's,/,\\\\,g')
 
     AC_DEFINE([FREECIV_SOCKET_ZERO_NOT_STDIN], [1], [Mingw-specific setting - 
stdin])
@@ -1372,15 +1373,15 @@
 FC_EXPAND_DIR(FREECIV_DATADIR, "$datadir/freeciv")
 
 if test x"$MINGW" = xyes; then
-  DEFAULT_SAVE_PATH=".;$FREECIV_STORAGE_DIR\\\\\\\\saves"
+  DEFAULT_SAVE_PATH=".;${FREECIV_STORAGE_DIR_ESC}\\\\\\\\saves"
   if test x$crosser = xyes ; then
-    FC_CONF_PATH="../etc/freeciv"
-    
DEFAULT_DATA_PATH=".;data;$FREECIV_STORAGE_DIR/$DATASUBDIR;$datadir/freeciv;../share/freeciv"
-    
DEFAULT_SCENARIO_PATH=".;data/scenarios;$FREECIV_STORAGE_DIR/$DATASUBDIR/scenarios;$FREECIV_STORAGE_DIR/scenarios;$datadir/freeciv/scenarios;../share/freeciv/scenarios"
+    FC_CONF_PATH="..\\\\\\\\etc\\\\\\\\freeciv"
+    
DEFAULT_DATA_PATH=".;data;${FREECIV_STORAGE_DIR_ESC}\\\\\\\\$DATASUBDIR;$datadir\\\\\\\\freeciv;..\\\\\\\\share\\\\\\\\freeciv"
+    
DEFAULT_SCENARIO_PATH=".;data\\\\\\\\scenarios;${FREECIV_STORAGE_DIR_ESC}\\\\\\\\$DATASUBDIR\\\\\\\\scenarios;${FREECIV_STORAGE_DIR_ESC}\\\\\\\\scenarios;$datadir\\\\\\\\freeciv\\\\\\\\scenarios;..\\\\\\\\share\\\\\\\\freeciv\\\\\\\\scenarios"
   else
     FC_CONF_PATH="etc\\\\\\\\freeciv"
-    
DEFAULT_DATA_PATH=".;data;$FREECIV_STORAGE_DIR\\\\\\\\$DATASUBDIR;$datadir\\\\\\\\freeciv"
-    
DEFAULT_SCENARIO_PATH=".;data\\\\\\\\scenarios;$FREECIV_STORAGE_DIR\\\\\\\\$DATASUBDIR\\\\\\\\scenarios;$FREECIV_STORAGE_DIR\\\\\\\\scenarios;$datadir\\\\\\\\freeciv\\\\\\\\scenarios"
+    
DEFAULT_DATA_PATH=".;data;${FREECIV_STORAGE_DIR_ESC}\\\\\\\\$DATASUBDIR;$datadir\\\\\\\\freeciv"
+    
DEFAULT_SCENARIO_PATH=".;data\\\\\\\\scenarios;${FREECIV_STORAGE_DIR_ESC}\\\\\\\\$DATASUBDIR\\\\\\\\scenarios;${FREECIV_STORAGE_DIR_ESC}\\\\\\\\scenarios;$datadir\\\\\\\\freeciv\\\\\\\\scenarios"
   fi
 else
   FC_CONF_PATH="$sysconfdir/freeciv"


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

Reply via email to