chat: fixed handling of unsupported files in DB and chache dir
This commit is contained in:
parent
e922ab38bd
commit
168c1f0f65
@ -45,7 +45,7 @@ def read_dir(dir_path: pathlib.Path,
|
|||||||
messages: list[Message] = []
|
messages: list[Message] = []
|
||||||
file_iter = dir_path.glob(glob) if glob else dir_path.iterdir()
|
file_iter = dir_path.glob(glob) if glob else dir_path.iterdir()
|
||||||
for file_path in sorted(file_iter):
|
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:
|
try:
|
||||||
message = Message.from_file(file_path, mfilter)
|
message = Message.from_file(file_path, mfilter)
|
||||||
if message:
|
if message:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user