Fix: folder export with --delete fails on a stale manifest.json.tmp (#14526)

This commit is contained in:
Ben Petty authored and GitHub committed 2026-10-22 11:50:31 -07:00
1 parent d872e456ab
commit 9b56dc2f61
2 files changed
+25

No files matched your search

+3
View File
@@ -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