fix: Handling of UTF-16 batch files (#1979)

This commit is contained in:
Kroese
2026-07-26 03:18:41 +02:00
committed by GitHub
parent 2b7d7bf902
commit 36d127d8cf
2 changed files with 52 additions and 6 deletions
+5 -1
View File
@@ -820,6 +820,10 @@ addFolder() {
file=$(find "$dest" -maxdepth 1 -type f -iname install.bat -print -quit) || return 1
if [ -s "$file" ]; then
normalizeBatch "$file" || return 1
fi
if [ -n "$COMMAND" ]; then
[ -z "$file" ] && file="$dest/install.bat"
@@ -832,7 +836,7 @@ addFolder() {
fi
if [ -f "$file" ]; then
if [ -s "$file" ]; then
if ! unix2dos -q "$file"; then
error "Failed to convert $file to DOS format!"