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

fix: unpacking tarballs that contain hard links #7062

Merged
merged 2 commits into from Sep 6, 2023
Merged

Conversation

zkochan
Copy link
Member

@zkochan zkochan commented Sep 6, 2023

No description provided.

@zkochan zkochan merged commit b394718 into main Sep 6, 2023
14 checks passed
@zkochan zkochan deleted the fix-tarball-parser branch September 6, 2023 18:48
@@ -135,6 +136,7 @@ export function parseTarball (buffer: Buffer): IParseResult {
switch (fileType) {
case 0:
case ZERO:
case FILE_TYPE_HARD_LINK:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zkochan , If the file type is a hard link, there is a string field at offset 157 with length 100 that contains the file to be linked to. Pretty sure the file contents aren't stored twice in the archive. https://www.subspacefield.org/~vax/tar_format.html

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.

None yet

3 participants