From b50821ba85ea457f6e8a47e04884fc66378ac167 Mon Sep 17 00:00:00 2001 From: j Date: Tue, 23 Feb 2016 17:45:03 +0530 Subject: [PATCH] more windows path fixes --- oml/item/models.py | 2 +- oml/item/scan.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/oml/item/models.py b/oml/item/models.py index b3a931d..b49490d 100644 --- a/oml/item/models.py +++ b/oml/item/models.py @@ -710,7 +710,7 @@ class File(db.Model): def fullpath(self): prefs = settings.preferences prefix = os.sep.join(os.path.join(os.path.expanduser(prefs['libraryPath']), 'Books/').split('/')) - return os.path.join(prefix, self.path) + return os.path.normpath(os.path.join(prefix, self.path)) def make_readonly(self): current_path = self.fullpath() diff --git a/oml/item/scan.py b/oml/item/scan.py index 7d117b1..042f389 100644 --- a/oml/item/scan.py +++ b/oml/item/scan.py @@ -113,7 +113,7 @@ def collect_books(prefix, status=None): if ext == 'kepub': ext = 'epub' if ext in extensions: - books.append(f) + books.append(os.path.normpath(f)) count += 1 if status and not status(count): return None