From 635ca814f47c137548c8c2ee79a27c8e598dd82d Mon Sep 17 00:00:00 2001 From: Adrien Allard Date: Thu, 13 Feb 2025 12:35:05 +0100 Subject: [PATCH] fix: issue where file with double extensions were not allowed (ex: .mp3.import) --- fc_hooks/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fc_hooks/__init__.py b/fc_hooks/__init__.py index adc5bec..796d86e 100644 --- a/fc_hooks/__init__.py +++ b/fc_hooks/__init__.py @@ -37,7 +37,7 @@ def check_path(path: Path) -> bool: return False else: # Check that file name use snake_case. - if re.search(r"[a-z]+(?:_[a-z0-9]+)*$", path.stem) is None: + if re.search(r"[a-z]+(?:_[a-z0-9]+)*(?:\.[a-z0-9]+)?$", path.stem) is None: return False return True