fix issue with database path falling back to faulty path

update logic in welcome wizard, add checks for qapplication instance
This commit is contained in:
2025-06-24 13:46:08 +02:00
parent 3d164898bf
commit c06ff40fd6
9 changed files with 515 additions and 358 deletions

View File

@@ -19,6 +19,11 @@ if not os.path.exists(CONFIG_DIR):
settings = Config(f"{CONFIG_DIR}/config.yaml")
DATABASE_DIR = (
app.user_config_dir if settings.database.path is None else settings.database.path
)
if not os.path.exists(DATABASE_DIR):
os.makedirs(DATABASE_DIR)
first_launch = settings.exists
if not os.path.exists(settings.database.temp.expanduser()):
settings.database.temp.expanduser().mkdir(parents=True, exist_ok=True)