diff --git a/tests/data/test3021 b/tests/data/test3021
index 1b23ff0482..775dd91f82 100644
--- a/tests/data/test3021
+++ b/tests/data/test3021
@@ -33,7 +33,7 @@ SFTP correct sha256 host key
# Needed for MSYS2 to not treat the argument as a POSIX path list
# that has to be converted to Windows paths
-MSYS2_ARG_CONV_EXCL=/
+MSYS2_ARG_CONV_EXCL=*
test
diff --git a/tests/data/test3022 b/tests/data/test3022
index 3e117701ad..a9dbcb0f2b 100644
--- a/tests/data/test3022
+++ b/tests/data/test3022
@@ -33,7 +33,7 @@ SCP correct sha256 host key
# Needed for MSYS2 to not treat the argument as a POSIX path list
# that has to be converted to Windows paths
-MSYS2_ARG_CONV_EXCL=/
+MSYS2_ARG_CONV_EXCL=*
test