From de2fc87995165d4601d19b49b045f44519e3dbdb Mon Sep 17 00:00:00 2001 From: JalonSolov Date: Wed, 9 Mar 2022 17:29:37 -0500 Subject: [PATCH] os: handle trailing backslash on windows path when quoting (#13705) --- vlib/os/os.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index bf233bcdde..a0a8397249 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -761,7 +761,7 @@ pub fn execute_or_exit(cmd string) Result { // quoted path - return a quoted version of the path, depending on the platform. pub fn quoted_path(path string) string { $if windows { - return '"$path"' + return if path.ends_with(path_separator) { '"${path + path_separator}"' } else { '"$path"' } } $else { return "'$path'" }