mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-22 16:06:19 -05:00
POST /api/files/rename on a directory changed Collections on the request's
deferred transaction. For a plain directory, that transaction was opened
before the FileWorker moved the files and wrote only after, so if anything
else wrote meanwhile the Collection update failed ("database is locked"):
the request returned 409 with the files already moved, and the nested
Collections still pointed at the old directory. Renaming a Collection's
own directory failed the same way, before moving anything.
rename_directory now changes Collections in a `write` (request.ctx.db.write
from the endpoint), which begins as a writer. Files are moved outside it;
nested Collections are read inside it, after the move.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| test | ||
| __init__.py | ||
| api.py | ||
| downloader.py | ||
| indexers.py | ||
| lib.py | ||
| modeler.py | ||
| models.py | ||
| move.py | ||
| progress.py | ||
| refresh.py | ||
| reorganize_job.py | ||
| schema.py | ||
| worker.py | ||