fix: ensure data directory exists before SQLite engine init

On fresh installs the data/ dir may not exist, causing SQLite to create a
stub file without write permissions. mkdir(parents=True, exist_ok=True) runs
at import time before any DB operation.

Also add data/.gitignore to prevent homelab.db from ever being committed.
This commit is contained in:
Pouzor
2026-03-09 22:38:26 +01:00
parent 20d9473f38
commit 5246770a3a
2 changed files with 8 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
*.db
*.db-shm
*.db-wal
scan_config.json