diff --git a/src/transcription/services/prompts.py b/src/transcription/services/prompts.py index b0b18be..31c7ed9 100644 --- a/src/transcription/services/prompts.py +++ b/src/transcription/services/prompts.py @@ -104,8 +104,11 @@ class PromptStore: def _resolve_existing_prompt(self, name: str) -> Path: normalized_name = name.strip() + # Path().name is platform-dependent: POSIX treats "\" as an ordinary filename + # character, so reject both separators explicitly to match config.PromptFilename. if ( not normalized_name + or any(separator in normalized_name for separator in ("/", "\\")) or Path(normalized_name).name != normalized_name or Path(normalized_name).suffix.lower() != PROMPT_EXTENSION ):