Repository navigation
feat: offer split ZIP sets found inside an extraction - #159
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 byextract --nested, once, by its.z01, and extracted as a set.Why
nested_kindnever matched.z01, and matched the.ziponly 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_kindnames a.z01that starts like a first segment (PK\x07\x08orPK00then a local header, or a local header, the startsopen_splitaccepts) assplit-zip.session::nested_offer(path, written), used by both front ends: the path and its set's first volume must both passnested_kind, thenvolumes_writtenmust hold. The CLI now lists and extracts the first volume.volumes_writtenfor a split ZIP now also requires the.zipto exist, and refuses a set where the run wrote a segment past a missing one.Safety rules
.z01up 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..z01, or one next to a.zipthe person had, is not offered..z01,.z03,.zipwithout.z02is not offered..z01and.zipwhose index names more segments is offered and refused by the split reader before anything changes.Tests
crates/cli/tests/nested.rs): a whole set inside is extracted once, every segment gone and the files right; a set whose.z01was 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.z01plus.zipmissing segments its index names is refused with every part intact.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.z01are not offered.No new strings. CI is the only test run.