windows pathnames
This commit is contained in:
parent
5f1325c7aa
commit
5dead44107
5 changed files with 38 additions and 8 deletions
|
|
@ -657,7 +657,7 @@ class File(db.Model):
|
|||
|
||||
def fullpath(self):
|
||||
prefs = settings.preferences
|
||||
prefix = os.path.join(os.path.expanduser(prefs['libraryPath']), 'Books/')
|
||||
prefix = os.sep.join(os.path.join(os.path.expanduser(prefs['libraryPath']), 'Books/').split('/'))
|
||||
return os.path.join(prefix, self.path)
|
||||
|
||||
def make_readonly(self):
|
||||
|
|
@ -672,7 +672,7 @@ class File(db.Model):
|
|||
def format_underscores(string):
|
||||
return re.sub('^\.|\.$|:|/|\?|<|>', '_', string)
|
||||
prefs = settings.preferences
|
||||
prefix = os.path.join(os.path.expanduser(prefs['libraryPath']), 'Books/')
|
||||
prefix = os.sep.join(os.path.join(os.path.expanduser(prefs['libraryPath']), 'Books/').split('/'))
|
||||
j = self.item.json()
|
||||
|
||||
current_path = self.fullpath()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue