If possible use loaded db to get db file inner_path

This commit is contained in:
shortcutme 2019-12-17 14:21:47 +01:00
parent 02d45e9c39
commit 8ed7d0385d
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -44,11 +44,14 @@ class SiteStorage(object):
raise Exception("Directory not exists: %s" % self.directory)
def getDbFile(self):
if self.isFile("dbschema.json"):
schema = self.loadJson("dbschema.json")
return schema["db_file"]
if self.db:
return self.db.schema["db_file"]
else:
return False
if self.isFile("dbschema.json"):
schema = self.loadJson("dbschema.json")
return schema["db_file"]
else:
return False
# Create new databaseobject with the site's schema
@util.Noparallel()