Skip to content

feat: offer split ZIP sets found inside an extraction - #159

Merged
xevrion merged 6 commits into
mainfrom
feat/nested-split-zip
Nov 27, 2026
Merged

xevrion merged 6 commits into
mainfrom
feat/nested-split-zip

Conversation

@xevrion

@xevrion xevrion commented Nov 27, 2026

Copy link
Copy Markdown
Owner

What

A native split ZIP (set.z01, set.z02, ..., set.zip) that an extraction wrote is now offered by the app's "extract inside" offer and by extract --nested, once, by its .z01, and extracted as a set.

Why

nested_kind never matched .z01, and matched the .zip only when that last segment happened to start with a local header, which a size-split one usually does not. So a split ZIP inside an archive was almost never offered.

How

  • archive::nested_kind names a .z01 that starts like a first segment (PK\x07\x08 or PK00 then a local header, or a local header, the starts open_split accepts) as split-zip.
  • New session::nested_offer(path, written), used by both front ends: the path and its set's first volume must both pass nested_kind, then volumes_written must hold. The CLI now lists and extracts the first volume.
  • volumes_written for a split ZIP now also requires the .zip to exist, and refuses a set where the run wrote a segment past a missing one.

Safety rules

  • Every segment, .z01 up to the .zip, must be a file this run wrote and did not keep. A set with any part the person had is never offered.
  • A lone .z01, or one next to a .zip the person had, is not offered.
  • .z01, .z03, .zip without .z02 is not offered.
  • A .z01 and .zip whose index names more segments is offered and refused by the split reader before anything changes.

Tests

  • CLI (crates/cli/tests/nested.rs): a whole set inside is extracted once, every segment gone and the files right; a set whose .z01 was the person's, a set with a segment kept by --skip-existing, and a set missing a middle segment are not offered and stay intact; a .z01 plus .zip missing segments its index names is refused with every part intact.
  • GUI (crates/gui/src/work.rs): a whole set is offered once and the nested job extracts it; a kept segment, a missing middle segment and a lone .z01 are not offered.

No new strings. CI is the only test run.

@xevrion
xevrion merged commit 4f7d2fc into main Nov 27, 2026
21 checks passed
@xevrion
xevrion deleted the feat/nested-split-zip branch November 27, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant