mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-10 13:39:12 +00:00
Tar filename with exactly 100 characters gets cut #322
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @majoreffort on GitHub (Jul 23, 2018).
Filenames with exactly 100 characters loose their last character while writing the header (TarHeader#Write).
I wrote a simple test to verify this issue: See
ec044e6f42I also digged into the code and found the method
WriteStringBytesactually writes a maximum of length-1 bytes:Is this intended and/or tar only supports 99 character entries?
If I replace
length - 1with onlylengththe tar tests work fine.@adamhathcock commented on GitHub (Jul 23, 2018):
Mind submitting the test and a fix as a pull request? Thanks!
@majoreffort commented on GitHub (Jul 23, 2018):
Sure, added PR #408.