mirror of
https://github.com/Garmelon/PFERD.git
synced 2026-04-12 15:35:05 +02:00
Do not collapse directory structure when sanitizing
This commit is contained in:
parent
733e1ae136
commit
1486a63854
1 changed files with 1 additions and 1 deletions
|
|
@ -21,7 +21,7 @@ from PFERD.utils import to_path
|
||||||
def sanitize_path(path: PurePath) -> Optional[PurePath]:
|
def sanitize_path(path: PurePath) -> Optional[PurePath]:
|
||||||
# Escape windows illegal path characters
|
# Escape windows illegal path characters
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
return PurePath(re.sub(r'[<>:"/\\|?]', "_", str(path)))
|
return PurePath(re.sub(r'[<>:"/|?]', "_", str(path)))
|
||||||
return path
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue