From b559146951cabbb4da059f083eb18d78e6fc564f Mon Sep 17 00:00:00 2001 From: fewtarius Date: Fri, 29 Dec 2023 17:55:37 +0000 Subject: [PATCH] Fix long standing get_settings bug that does not honor filenames with a single quote. --- packages/jelos/profile.d/001-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jelos/profile.d/001-functions b/packages/jelos/profile.d/001-functions index eb28b087a8..19125c55e2 100644 --- a/packages/jelos/profile.d/001-functions +++ b/packages/jelos/profile.d/001-functions @@ -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