From 2d918bfb72fad5e5016df860c32cd748e5b40c6f Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Wed, 26 Apr 2017 19:21:40 +0100 Subject: [PATCH] Fix for invalid db path --- cps/db.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cps/db.py b/cps/db.py index 831b597e..dbb01237 100755 --- a/cps/db.py +++ b/cps/db.py @@ -286,6 +286,11 @@ def setup_db(): global cc_classes if config.config_calibre_dir is None or config.config_calibre_dir == u'': + content = ub.session.query(ub.Settings).first() + content.config_calibre_dir = None + content.db_configured = False + ub.session.commit() + config.loadSettings() return False dbpath = os.path.join(config.config_calibre_dir, "metadata.db")