diff --git a/steamtinkerlaunch b/steamtinkerlaunch index c0f4c02c..837ac235 100755 --- a/steamtinkerlaunch +++ b/steamtinkerlaunch @@ -7,7 +7,7 @@ PREFIX="/usr" PROGNAME="SteamTinkerLaunch" NICEPROGNAME="Steam Tinker Launch" -PROGVERS="v14.0.20240324-1 (updateConfigEntry-escpae-incoming-cfgvalue)" +PROGVERS="v14.0.20240324-2 (updateConfigEntry-escpae-incoming-cfgvalue)" PROGCMD="${0##*/}" PROGINTERNALPROTNAME="Proton-stl" SHOSTL="stl" @@ -10896,7 +10896,6 @@ function createDefaultCfgs { function updateConfigEntry { CFGCAT="$1" CFGVALUE="$2" - ESCAPED_CFGVALUE="$( printf "%s" "$CFGVALUE" | sed 's/\\/\\\\/g' )" # Help prevent expanding incoming config values by escaping them (i.e. when using with sed) CFGFILE="$3" if [ "$CFGCAT" == "CUSTOMCMD" ] && [ "$CFGFILE" == "$STLDEFGAMECFG" ]; then @@ -10921,6 +10920,9 @@ function updateConfigEntry { CFGVALUE="" fi + # Help prevent expanding incoming config values by escaping them (i.e. when using with sed) + ESCAPED_CFGVALUE="$( printf "%s\n" "$CFGVALUE" | sed 's/\\/\\\\/g' )" + # only save value if it changed # sed needs escaped string because otherwise it'll expand escape sequences in strings with backslashes # i.e. config values with Windows paths, '\home\test' will have '\t' expanded as a tab character