Fixed: Escaped delimter for sed to fix config not saving "/" character

pull/106/head
aristocratos 2020-05-06 16:49:26 +02:00
parent f29397a212
commit f52541ffea
1 changed files with 2 additions and 0 deletions

View File

@ -578,6 +578,8 @@ save_config() { #? Saves variables to config file if not same, usage: save_confi
if [[ ${tmp_value//\"/} != "${!var}" ]]; then if [[ ${tmp_value//\"/} != "${!var}" ]]; then
original="${var}=${tmp_value}" original="${var}=${tmp_value}"
new="${var}=\"${!var}\"" new="${var}=\"${!var}\""
original="${original//'/'/'\/'}"
new="${new//'/'/'\/'}"
sed -i "s/${original}/${new}/" "${config_file}" sed -i "s/${original}/${new}/" "${config_file}"
fi fi
else else