From c082c5c66876a48ea587c500a49d21c0d99e2250 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Thu, 22 Apr 2021 02:19:25 +0200 Subject: [PATCH] Let msvcsdeps process relative paths and in a deterministic manner --- waflib/extras/msvcdeps.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/waflib/extras/msvcdeps.py b/waflib/extras/msvcdeps.py index a3881241..2ca52991 100644 --- a/waflib/extras/msvcdeps.py +++ b/waflib/extras/msvcdeps.py @@ -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