Skip to content

Commit

Permalink
Fixed path handling again
Browse files Browse the repository at this point in the history
  • Loading branch information
brookite committed Aug 24, 2022
1 parent 5d565fd commit 4e6f5a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/appinfo.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VERSION_NAME = "1.0 RC1"
BUILD_NUMBER = 1142
BUILD_NUMBER = 1143
5 changes: 3 additions & 2 deletions app/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,9 @@ def to_book_path(self, path) -> str:
for bookpath in self.book_paths:
bookpath = os.path.abspath(bookpath)
if commonpath([bookpath, os.path.abspath(path)]) == bookpath:
return os.path.abspath(path).replace(bookpath, "$BOOKS_PATH")
return self.fix_separator(os.path.abspath(path))
return self.fix_separator(
os.path.abspath(path).replace(bookpath, "$BOOKS_PATH"))
return os.path.normpath(os.path.abspath(path))

def get_var(self, var) -> Union[str, Tuple[str]]:
if var == "DEFAULT_THUMBNAIL_PATH":
Expand Down

0 comments on commit 4e6f5a7

Please sign in to comment.