From 96980bc4a858e5caf2062125ec91b6caadc4b6c7 Mon Sep 17 00:00:00 2001 From: juk0de Date: Fri, 1 Sep 2023 12:44:27 +0200 Subject: [PATCH] chat: fixed handling of unsupported files in DB and chache dir --- chatmastermind/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chatmastermind/chat.py b/chatmastermind/chat.py index 759467d..11f1d74 100644 --- a/chatmastermind/chat.py +++ b/chatmastermind/chat.py @@ -45,7 +45,7 @@ def read_dir(dir_path: pathlib.Path, messages: list[Message] = [] file_iter = dir_path.glob(glob) if glob else dir_path.iterdir() for file_path in sorted(file_iter): - if file_path.is_file(): + if file_path.is_file() and file_path.suffix in Message.file_suffixes: try: message = Message.from_file(file_path, mfilter) if message: