Skip to content

Commit

Permalink
Use os.path.isfile to check if a file exists
Browse files Browse the repository at this point in the history
Co-authored-by: Naglis Jonaitis <[email protected]>
  • Loading branch information
rdbende and naglis authored Jan 6, 2024
1 parent 11c987d commit 2f26ce2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cozy/view_model/library_view_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 2f26ce2

Please sign in to comment.