From 1486a63854d38662035630efbccb29d5ccb931a9 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Tue, 10 Nov 2020 22:53:47 +0100 Subject: [PATCH] Do not collapse directory structure when sanitizing --- sync_url.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sync_url.py b/sync_url.py index ebb635b..998584f 100755 --- a/sync_url.py +++ b/sync_url.py @@ -21,7 +21,7 @@ from PFERD.utils import to_path def sanitize_path(path: PurePath) -> Optional[PurePath]: # Escape windows illegal path characters if os.name == 'nt': - return PurePath(re.sub(r'[<>:"/\\|?]', "_", str(path))) + return PurePath(re.sub(r'[<>:"/|?]', "_", str(path))) return path