Repository navigation
Create missing parent directories when packaging a bag - #81
Merged
Merged
Conversation
Owner
|
Thanks for your contribution @tacman, I'll have a look at your other PR very soon. |
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.
Packaging to a path such as
new/nested/archive.tar.bz2fails when its parent directories do not exist. This reproduces the exception reported in #75; existing nested destination directories work in my local test.Create the destination parent recursively through the existing checked filesystem helper after validation and before writing the archive. This applies consistently to tar, tar.gz, tgz, tar.bz2 and ZIP. Archive write failures still raise errors.
The regression test fails for all five formats before the fix. With the fix, each archive is created, reloaded, validated, and its payload checksums compared with the source bag.
Validation: PHP 8.4, 259 tests / 1548 assertions pass; PSR-12 checks pass. This PR branches directly from upstream main and is independent of #80.
Fixes #75 for the missing-parent-directory case. If the original reporter's directory already exists, additional environment details would still be needed to reproduce that case.