diff --git a/tests/utils/stl/test/format.py b/tests/utils/stl/test/format.py index 042112cef10..e5e5b2774df 100644 --- a/tests/utils/stl/test/format.py +++ b/tests/utils/stl/test/format.py @@ -65,7 +65,7 @@ def _getEnvLst(sourcePath, localConfig): def _isLegalDirectory(sourcePath, test_subdirs): for prefix in test_subdirs: common = os.path.normpath(os.path.commonpath((sourcePath, prefix))) - if common == sourcePath or common == prefix: + if os.path.samefile(common, sourcePath) or os.path.samefile(common, prefix): return True return False