bazeldnf icon indicating copy to clipboard operation
bazeldnf copied to clipboard

Fix overwrite of the tar header fields

Open vasiliy-ul opened this issue 2 years ago • 3 comments

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.

vasiliy-ul avatar Sep 08 '22 12:09 vasiliy-ul

@rmohr FYI.

vasiliy-ul avatar Sep 08 '22 12:09 vasiliy-ul

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?

rmohr avatar Sep 08 '22 12:09 rmohr

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.

vasiliy-ul avatar Sep 08 '22 12:09 vasiliy-ul