[upstream_utils] Use os path separator when matching path (#6993)

This commit is contained in:
Ryan Blue
2024-08-24 09:52:52 -04:00
committed by GitHub
parent 96bd1e489f
commit 370e63ede6
7 changed files with 15 additions and 11 deletions

View File

@@ -19,7 +19,7 @@ def eigen_inclusions(dp, f):
dp -- directory path
f -- filename
"""
if not dp.startswith("./Eigen"):
if not dp.startswith(os.path.join(".", "Eigen")):
return False
abspath = os.path.join(dp, f)
@@ -79,7 +79,7 @@ def unsupported_inclusions(dp, f):
dp -- directory path
f -- filename
"""
if not dp.startswith("./unsupported"):
if not dp.startswith(os.path.join(".", "unsupported")):
return False
abspath = os.path.join(dp, f)