Cater for different drive letters when normalizing path (#1169)

Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
This commit is contained in:
Matt Smith 2024-02-20 20:34:17 +11:00 committed by GitHub
parent 9949fce954
commit 5547abc63b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -661,10 +661,10 @@ def _print_env():
]
def _normalize_path(path):
# Change Windows style paths to Unix style. E.g. change "C:" to "/c"
# Change Windows style paths to Unix style.
if path[0].isalpha() and path[1] == ":":
path = path.replace(path[0:2], "/" + path[0].lower())
# Change "c:\foo;d:\bar" to "/c/foo:/d/bar
return "/" + path.replace("\\", "/").replace(":/", "/").replace(";", ":/")
return path.replace("\\", "/").replace(";", ":")
def _correct_path_variable(env):