Compare commits

..
1 Commits
Author SHA1 Message Date
cnmcdee 37c27dba8a zseg: pre-create extract target dir so apt zpaqfranz 61.2d works
61.2d refuses -to ext when the target directory does not exist yet (66.1 creates it). extract_segment now makedirs ext/ first, so both versions unpack. Verified byte-identical round-trip with 61.2d and 66.1; make test passes.
2026-12-03 21:05:35 -05:00
+3
View File
@@ -130,6 +130,9 @@ def extract_segment(zpaq, index, blob, tmpdir):
os.makedirs(d, exist_ok=True)
with open(os.path.join(d, "seg.zpaq"), "wb") as f:
f.write(blob)
# apt zpaqfranz 61.2d refuses `-to ext` when the target dir does not
# exist yet (66.1 creates it); pre-create it so both versions work.
os.makedirs(os.path.join(d, "ext"), exist_ok=True)
run_zpaq(zpaq, ["x", "seg.zpaq", "-to", "ext"], cwd=d)
with open(os.path.join(d, "ext", "chunk.bin"), "rb") as f:
return index, f.read()