From 2f26ce2c2fb0b96715c4cb9663ee7475cdca7406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benedek=20D=C3=A9v=C3=A9nyi?= Date: Sat, 6 Jan 2024 17:28:02 +0100 Subject: [PATCH] Use `os.path.isfile` to check if a file exists Co-authored-by: Naglis Jonaitis <827324+naglis@users.noreply.github.com> --- cozy/view_model/library_view_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cozy/view_model/library_view_model.py b/cozy/view_model/library_view_model.py index 05eb56b2..180ac467 100644 --- a/cozy/view_model/library_view_model.py +++ b/cozy/view_model/library_view_model.py @@ -156,7 +156,7 @@ def open_library(self): def book_files_exist(self, book: Book) -> bool: for chapter in book.chapters: - if os.path.exists(chapter.file): + if os.path.isfile(chapter.file): return True return False