fix: Check for presence of alt separator & separator together

This commit is contained in:
r-leyshon 2023-08-16 07:35:49 +01:00
parent a2b02b8920
commit 5e0f097ac7

View file

@ -176,7 +176,7 @@ def normalize_path(path: str, parent: str = os.curdir) -> str:
if (
path == "."
or separator in path
or (alternate_separator and alternate_separator in path)
or (alternate_separator and separator in path)
):
path = os.path.abspath(os.path.join(parent, path))
return path.rstrip(separator + alternate_separator)