Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

miscellaneous fixes and improvements #104

Merged
merged 3 commits into from
Apr 21, 2021
Merged

miscellaneous fixes and improvements #104

merged 3 commits into from
Apr 21, 2021

Conversation

StefanKarpinski
Copy link
Member

  • Allowing the Tar.list callback to receive the raw header data (especially in the form of a vector of fields) is highly useful for analyzing wild tarballs. I implemented this when working on adding support for hard links so that I could look at a tarball containing hard links more easily.

  • Adding a Header method that takes an existing Header object and modifies some of its fields is a pattern that's used in various places in the code base which this method makes cleaner and clearer.

  • This makes all cases where the end of a tarball is encountered before it is expected throw the same EOFError whereas previously some places threw that error while others threw a generic error with a premature end of file message.

  • This changes also makes the definition of a skip method for processes conditional so that when testing with a Julia version that has Tar as a stdlib (and thus already has this method defined), we don't break precompilation by redefining that method.

It's often convenient to construct a `Header` object that is the same as
another `Header` object except with some fields modified. This lets that
be expressed by using keywords to pass the modified fields.
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #104 (cffb931) into master (82cc7dd) will decrease coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #104      +/-   ##
==========================================
- Coverage   96.37%   96.26%   -0.11%     
==========================================
  Files           4        4              
  Lines         634      643       +9     
==========================================
+ Hits          611      619       +8     
- Misses         23       24       +1     
Impacted Files Coverage Δ
src/Tar.jl 96.05% <ø> (-1.32%) ⬇️
src/create.jl 97.05% <100.00%> (ø)
src/extract.jl 96.34% <100.00%> (+0.07%) ⬆️
src/header.jl 94.20% <100.00%> (+0.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82cc7dd...cffb931. Read the comment docs.

@StefanKarpinski StefanKarpinski merged commit 008a3f2 into master Apr 21, 2021
@StefanKarpinski StefanKarpinski deleted the sk/misc branch April 21, 2021 20:26
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