mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2026-10-23 16:18:55 +00:00
Fix: folder export with --delete fails on a stale manifest.json.tmp (#14526)
This commit is contained in:
1 parent
d872e456ab
commit
9b56dc2f61
2 files changed
+25
No files matched your search
@@ -193,6 +193,9 @@ class DirectoryExportSink(ExportSink):
|
||||
raise RuntimeError("A stream is already open on this sink")
|
||||
target = (self._target / arcname).resolve()
|
||||
tmp = target.with_suffix(target.suffix + ".tmp")
|
||||
# A stale tmp from an interrupted run is overwritten and consumed here,
|
||||
# so it must not be pruned as a leftover at finalize.
|
||||
self._snapshot.discard(tmp)
|
||||
target.parent.mkdir(parents=True, exist_ok=True)
|
||||
handle = tmp.open("w", encoding="utf-8")
|
||||
self._stream_open = True
|
||||
|
||||
Reference in new issue
Block a user