Skip to content

Commit e27de1e

Browse files
committed
initfuncs: change sed separator for iniGet
Use `#` instead of `/` for SED's substitution command separator. This makes the `iniGet` command work for key values containing `/` (like Dolphin's input configuration files). The `#` character is usually reserved for comment lines in an `.ini` file, so it should be relatively safe to use as separator; `sed` accepts any character besides `*` or newline for separator, so `#` should also be safe here.
1 parent 8d9b5af commit e27de1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scriptmodules/inifuncs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ function iniGet() {
152152
value_m="\([^\r]*\)"
153153
fi
154154

155-
ini_value="$(sed -n "s/^[ |\t]*$key[ |\t]*$delim_strip[ |\t]*$value_m.*/\1/p" "$file" | tail -1)"
155+
ini_value="$(sed -n "s#^[ |\t]*$key[ |\t]*$delim_strip[ |\t]*$value_m.*#\1#p" "$file" | tail -1)"
156156
}
157157

158158
# @fn retroarchIncludeToEnd()

0 commit comments

Comments
 (0)