File size: 462 Bytes
a4514b4 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | from __future__ import annotations
import os
from pathlib import Path
from PySide6.QtCore import QStandardPaths
from clfgui.kernel import default_db_path
def qstandard_db_path() -> Path:
if os.environ.get("CLFGUI_DB_PATH"):
return default_db_path()
location = QStandardPaths.writableLocation(QStandardPaths.StandardLocation.AppDataLocation)
if not location:
return default_db_path()
return Path(location) / "clfgui.sqlite3"
|