more windows path fixes

This commit is contained in:
j 2016-02-23 17:45:03 +05:30
parent a37a63d8da
commit b50821ba85
2 changed files with 2 additions and 2 deletions

View File

@ -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()

View File

@ -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