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 overwrite of the tar header fields #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vasiliy-ul
Copy link

Set proper Typeflag and Size when handling hardlinks and regular files.

Noticed that by visual code inspection: in the original code, tarHeader.Typeflag was overwritten with tar.TypeReg when handling an entry for a hardlink. A similar issue was with the tarHeader.Size: it was set to 0 for regular files.

Set proper Typeflag and Size when handling hardlinks and regular files.

Signed-off-by: Vasiliy Ulyanov <vulyanov@suse.de>
@vasiliy-ul
Copy link
Author

@rmohr FYI.

@rmohr
Copy link
Owner

rmohr commented Sep 8, 2022

Thanks, I first have to check a fix in that are I did before. This seems to be the same area. Did you run into a specific issue to reproduce thus?

@vasiliy-ul
Copy link
Author

No, there was no specific issue. I was debugging some stuff and just noticed that in the code. That part with hardlinks seemed not right for me. Feel free to close the PR if the fix is not relevant or correct.

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

2 participants