Fix long standing get_settings bug that does not honor filenames with a single quote.
This commit is contained in:
parent
7d4b58ab25
commit
b559146951
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ function get_setting() {
|
|||
if [ -n "${3}" ]
|
||||
then
|
||||
### Test to see if we have a game setting.
|
||||
VAR="$2\[\"$(echo ${3} | sed 's/\W/\\&/g')\"]\.$1"
|
||||
VAR="$2\[\"$(echo ${3} | sed -E "s~'~\\\x27~g"';s~[()&]~\\&~g')\"\]\.$1"
|
||||
OUTPUT=$(awk 'BEGIN {FS="="} /^'"${VAR}"'/ {print $NF}' ${J_CONF})
|
||||
if [ ! -z "${OUTPUT}" ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue