remove_dotdot_prefixes: remove bad assert, fixes #9406

guess the assert was meant to make sure that we do not have backslashes as path separators, but did not consider that on linux a backslash can be part of a filename (without being a path separator).
This commit is contained in:
Thomas Waldmann 2026-02-23 19:59:08 +01:00
parent 3e15918b82
commit 23f7388e21
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -328,7 +328,6 @@ def remove_dotdot_prefixes(path):
`path` is expected to be normalized already (e.g. via `posixpath.normpath()`).
"""
assert "\\" not in path
if is_win32:
if len(path) > 1 and path[1] == ":":
path = path.replace(":", "", 1)