From 4a1b93df8bbca606381c8423ce009cdd2af3c5a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sun, 13 Mar 2022 00:19:51 +0200 Subject: [PATCH] Convert absolute paths to Windows form for options like /FI in msvc-wine.sh This handling is generally specific to cl.exe only, but hopefully this doesn't cause issues for other tools. --- wrappers/wine-msvc.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wrappers/wine-msvc.sh b/wrappers/wine-msvc.sh index 2f52456..06138c6 100755 --- a/wrappers/wine-msvc.sh +++ b/wrappers/wine-msvc.sh @@ -20,6 +20,13 @@ ARGS=() while [ $# -gt 0 ]; do a=$1 case $a in + [-/][A-Za-z][A-Za-z]/*) + opt=${a:0:3} + path=${a:3} + if [ -d "$(dirname "$path")" ] && [ "$(dirname "$path")" != "/" ]; then + a=${opt}z:$path + fi + ;; /*) if [ -d "$(dirname "$a")" ] && [ "$(dirname "$a")" != "/" ]; then a=z:$a