fix: network-share readers, model unload off the loop, bad save requests (#620)

Every read-only SQLite open now uses one URI helper, so a library on a Windows
network share works in backups, restores, moves and history reads. Unloading a
model no longer blocks the server. A malformed /save body gets a 400, not a 500.
This commit is contained in:
Vito Sansevero
2026-11-02 10:23:26 -08:00
parent f6432fec74
commit d0ab5680d9
13 changed files with 141 additions and 38 deletions
+3 -1
View File
@@ -30,8 +30,10 @@ from .jobs import (
)
try:
from ...database.sqlite_uri import readonly_uri
from ...utils.parallel import map_parallel
except ImportError:
from database.sqlite_uri import readonly_uri
from utils.parallel import map_parallel
try:
@@ -399,7 +401,7 @@ def _inspect_restore_upload(path):
Returns:
None when acceptable, otherwise a human-readable reason (blocking).
"""
uri = Path(os.path.abspath(path)).as_uri() + "?mode=ro"
uri = readonly_uri(path)
try:
conn = sqlite3.connect(uri, uri=True)
except sqlite3.Error as e: