Merge remote-tracking branch 'custom-dbpath'

This commit is contained in:
OzzieIsaacs 2017-04-02 08:45:47 +02:00
commit 66181daf6d
2 changed files with 4 additions and 3 deletions

View File

@ -207,9 +207,10 @@ def backupCalibreDbAndOptionalDownload(drive, f=None):
if f:
databaseFile.GetContentFile(f)
def copyToDrive(drive, uploadFile, createRoot, replaceFiles,
ignoreFiles=[],
parent=None, prevDir=''):
ignoreFiles=[],
parent=None, prevDir=''):
if not drive:
drive=getDrive()
if drive.auth.access_token_expired:

View File

@ -13,7 +13,7 @@ from flask_babel import gettext as _
import json
#from builtins import str
dbpath = os.path.join(os.path.normpath(os.path.dirname(os.path.realpath(__file__)) + os.sep + ".." + os.sep), "app.db")
dbpath = os.path.join(os.path.normpath(os.getenv("CALIBRE_DBPATH", os.path.dirname(os.path.realpath(__file__)) + os.sep + ".." + os.sep)), "app.db")
engine = create_engine('sqlite:///{0}'.format(dbpath), echo=False)
Base = declarative_base()