From bb8de60efebbe43a73128e8b6ba36ea566f386fd Mon Sep 17 00:00:00 2001 From: BasioMeusPuga Date: Tue, 20 Mar 2018 20:36:24 +0530 Subject: [PATCH] Fix books in subdirectories getting filtered --- TODO | 2 ++ lector/library.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/TODO b/TODO index fb039be..c12ccbc 100644 --- a/TODO +++ b/TODO @@ -73,6 +73,8 @@ TODO ✓ Define every widget in code Bugs: Slider position change might be acting up + Deleted directories should be removed from the database + There are still slashes in the code Secondary: Annotations diff --git a/lector/library.py b/lector/library.py index 3bd54e9..a0b019a 100644 --- a/lector/library.py +++ b/lector/library.py @@ -256,7 +256,7 @@ class Library: if directory_name: directory_name = directory_name.lower() else: - directory_name = path.rsplit('/')[-1].lower() + directory_name = i.rsplit(os.sep)[-1].lower() directory_tags = library_directories[i][1] if directory_tags: