Let msvcsdeps process relative paths and in a deterministic manner

This commit is contained in:
Thomas Nagy 2021-04-22 02:19:25 +02:00
parent 71ada95e04
commit c082c5c668
1 changed files with 6 additions and 1 deletions

View File

@ -65,7 +65,12 @@ def get_correct_path_case(base_path, path):
for part in components:
part = part.lower()
search_path = os.path.join(base_path, corrected_path)
for item in os.listdir(search_path):
if part == '..':
corrected_path = os.path.join(corrected_path, part)
search_path = os.path.normpath(search_path)
continue
for item in sorted(os.listdir(search_path)):
if item.lower() == part:
corrected_path = os.path.join(corrected_path, item)
break