Trigger storage hook on sharing/delete with files backend

Unlike with the csv backend the files backend acquired only a reading lock which didn't trigger the storage hook.
This commit is contained in:
Nils Brederlow
2026-04-07 12:25:33 +02:00
committed by GitHub
parent 495feb5663
commit b88bac0523

View File

@@ -372,8 +372,8 @@ class Sharing(sharing.BaseSharing):
if not os.path.isfile(sharing_config_file):
return {"status": "not-found"}
# read content
with self._storage.acquire_lock("r", path=sharing_config_file):
# open writable so storage hook triggers
with self._storage.acquire_lock("w", path=sharing_config_file):
# read file
with open(sharing_config_file, "rb") as fb:
(version, row) = pickle.load(fb)