Skip to content

Commit e78e024

Browse files
qwertychouskieaustin987
authored andcommitted
w_set_app_winver: Fix issue with app names starting with "n"
Found when setting an app override for "node.exe" resulted in the reg file adding an incorrect newline mid-line, causing the app override to not actually get set up.
1 parent c9ec7e2 commit e78e024

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/winetricks

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2469,12 +2469,8 @@ w_set_app_winver()
24692469
_W_app="$1"
24702470
_W_version="$2"
24712471
echo "Setting ${_W_app} to ${_W_version} mode"
2472-
(
2473-
echo REGEDIT4
2474-
echo ""
2475-
echo "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\${_W_app}]"
2476-
echo "\"Version\"=\"${_W_version}\""
2477-
) > "${W_TMP}"/set-winver.reg
2472+
# Use printf to avoid echo interpreting \n in app names like "node.exe"
2473+
printf '%s\n' "REGEDIT4" "" "[HKEY_CURRENT_USER\\Software\\Wine\\AppDefaults\\${_W_app}]" "\"Version\"=\"${_W_version}\"" > "${W_TMP}"/set-winver.reg
24782474

24792475
w_try_regedit "${W_TMP_WIN}"\\set-winver.reg
24802476
rm "${W_TMP}"/set-winver.reg

0 commit comments

Comments
 (0)