diff --git a/maigret/settings.py b/maigret/settings.py index a355d39..5c927fa 100644 --- a/maigret/settings.py +++ b/maigret/settings.py @@ -5,7 +5,7 @@ from typing import List SETTINGS_FILES_PATHS = [ path.join(path.dirname(path.realpath(__file__)), "resources/settings.json"), - '~/.maigret/settings.json', + path.expanduser('~/.maigret/settings.json'), path.join(os.getcwd(), 'settings.json'), ] diff --git a/maigret/web/app.py b/maigret/web/app.py index dedc31d..d5eabc3 100644 --- a/maigret/web/app.py +++ b/maigret/web/app.py @@ -27,7 +27,7 @@ background_jobs = {} job_results = {} # Configuration -app.config["MAIGRET_DB_FILE"] = os.path.join('maigret', 'resources', 'data.json') +app.config["MAIGRET_DB_FILE"] = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'resources', 'data.json') app.config["COOKIES_FILE"] = "cookies.txt" app.config["UPLOAD_FOLDER"] = 'uploads' app.config["REPORTS_FOLDER"] = os.path.abspath('/tmp/maigret_reports')