bazeldnf
bazeldnf copied to clipboard
Fix overwrite of the tar header fields
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.
@rmohr FYI.
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?
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.