From 19e7eba25047b561789959966dee020acccd5aad Mon Sep 17 00:00:00 2001 From: Thomas Peetz Date: Wed, 22 Jul 2026 23:20:51 +0200 Subject: [PATCH] add check for short filenames --- kontor-scripts/check_kontor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kontor-scripts/check_kontor.py b/kontor-scripts/check_kontor.py index a921058..8d04371 100644 --- a/kontor-scripts/check_kontor.py +++ b/kontor-scripts/check_kontor.py @@ -43,6 +43,9 @@ def remove_file(log: Logger, item_data: Dict[str, Any], media_dirs: List[str]): for file_dir in media_dirs: log.info("look in %s", file_dir) file_name = Path(cloud_link).name + if len(file_name) < 5: + log.info("file_name too short, skip deleting") + break media_file = Path(file_dir, file_name) if media_file.exists(): log.info("File to remove %s", media_file.absolute())