halostatue / minitar

Minimal pure-ruby support for POSIX tar(1) archives.
Other
38 stars 27 forks source link

When tarball is created with a long filename with size of 512 or multiples of 512, GNU tar is raising `tar: A lone zero block at ` #45

Closed bv-vijay closed 2 months ago

bv-vijay commented 1 year ago

The long filename header has size as 512 and we're adding a zero-block @io.write("\0" * (512 - (long_name.length % 512))), so tar is expecting one more zero-block for file ending.