2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-25 11:19:52 +01:00

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 ba44704dbf
commit 67793aa173

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