mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
os: handle trailing backslash on windows path when quoting (#13705)
This commit is contained in:
parent
7231a3f135
commit
de2fc87995
@ -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.
|
// quoted path - return a quoted version of the path, depending on the platform.
|
||||||
pub fn quoted_path(path string) string {
|
pub fn quoted_path(path string) string {
|
||||||
$if windows {
|
$if windows {
|
||||||
return '"$path"'
|
return if path.ends_with(path_separator) { '"${path + path_separator}"' } else { '"$path"' }
|
||||||
} $else {
|
} $else {
|
||||||
return "'$path'"
|
return "'$path'"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user