Refactor database path handling to use Path object for improved compatibility

This commit is contained in:
Théophile Diot 2025-01-10 12:17:14 +01:00
parent 9a967805ff
commit f25ba38eec
No known key found for this signature in database
GPG key ID: FA995104A0BA376A

View file

@ -241,7 +241,7 @@ class Database:
self.logger.info(f"✅ Database connection established{'' if not self.readonly else ' in read-only mode'}")
if match.group("database").startswith("sqlite"):
db_path = match.group("path")
db_path = Path(match.group("path"))
try:
current_mode = db_path.stat().st_mode & 0o777
if current_mode != 0o660: