support tar.gz where files are prefixed by "./" - #27
Closed
davidB wants to merge 3 commits into
Closed
Conversation
Author
|
the error on windows is random, sometime present, sometime no-error and in various place. I'm not a windows FS expert. Any suggestion ? |
jaemk
added a commit
that referenced
this pull request
Sep 2, 2026
`tar -czf app.tar.gz -C dir .` stores every entry as `./name`, while `tar -czf app.tar.gz *` stores it as `name`. The lookup in `extract_file` was an exact path match on both the tar and zip arms, so the first archive failed with "Could not find the required path in the archive" even though the file was there, and the caller has no way to know which invocation produced the release artifact. Both arms now compare through `archive_path_matches`, which ignores a leading `./` on either side, so a `./`-prefixed request also matches a plainly-named entry. Interior components are compared exactly, so a same-named file in a subdirectory cannot be selected by accident. Reported in #27. Also pins two contracts that had no coverage: the github asset download URL comes from the API `url` field (not `browser_download_url`), and the download request carries `Accept: application/octet-stream`. Together those are what make a private release asset reachable, and a flip between the two URL fields has broken downloads before (#77).
jaemk
added a commit
that referenced
this pull request
Sep 2, 2026
`tar -czf app.tar.gz -C dir .` stores every entry as `./name`, while `tar -czf app.tar.gz *` stores it as `name`. The lookup in `extract_file` was an exact path match on both the tar and zip arms, so the first archive failed with "Could not find the required path in the archive" even though the file was there, and the caller has no way to know which invocation produced the release artifact. Both arms now compare through `archive_path_matches`, which ignores a leading `./` on either side, so a `./`-prefixed request also matches a plainly-named entry. Interior components are compared exactly, so a same-named file in a subdirectory cannot be selected by accident. Reported in #27. Also pins two contracts that had no coverage: the github asset download URL comes from the API `url` field (not `browser_download_url`), and the download request carries `Accept: application/octet-stream`. Together those are what make a private release asset reachable, and a flip between the two URL fields has broken downloads before (#77).
Owner
|
Hi @davidB, fixed in #211: |
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.
To allow self_update to use .bin_name("f1.txt") on :
archive are created like:
like (existing) for archive created like:
PS: calling
.bin_name("./f1.txt")failed