From ad53185247aa7182e95f7ef486b557e5a342ba08 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Tue, 29 Aug 2023 12:25:16 +0200 Subject: [PATCH] Sanitize ascii control characters on windows --- CHANGELOG.md | 1 + PFERD/deduplicator.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c675f2..ae809e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ ambiguous situations. - Crawling of button cards without descriptions - Abort crawling when encountering an unexpected ilias root page redirect - Remove size suffix for files in content pages +- Sanitize ascii control characters on Windows ### Added - `no-delete-prompt-override` conflict resolution strategy diff --git a/PFERD/deduplicator.py b/PFERD/deduplicator.py index 7777f28..559addb 100644 --- a/PFERD/deduplicator.py +++ b/PFERD/deduplicator.py @@ -14,7 +14,7 @@ def name_variants(path: PurePath) -> Iterator[PurePath]: class Deduplicator: - FORBIDDEN_CHARS = '<>:"/\\|?*' + FORBIDDEN_CHARS = '<>:"/\\|?*' + "".join([chr(i) for i in range(0, 32)]) FORBIDDEN_NAMES = { "CON", "PRN", "AUX", "NUL", "COM1", "COM2", "COM3", "COM4", "COM5", "COM6", "COM7", "COM8", "COM9",