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

minitar doesn't support GNU ././@LongName #4

Closed
halostatue opened this issue Jul 30, 2011 · 2 comments
Closed

minitar doesn't support GNU ././@LongName #4

halostatue opened this issue Jul 30, 2011 · 2 comments
Assignees
Milestone

Comments

@halostatue
Copy link
Owner

Submitted by Curt Sampson (http://rubyforge.org/users/cjs)

GNU tar has a convention for dealing with filenames longer than the 100 character limit imposed by the standard ustar
format. It creates an entry of type 'L' with the filename '././@longname', followed by a 512 byte block containing the
long filename, padded with zeros. The next entry is then the real entry for the file, with a truncated version of the
filename in the name field of the entry header.

The attached patch allows proper reading of tarfiles using this convention. It does not write files using this, however.
It appears that minitar, when writing a file with a name longer than 100 characters, will currently silently truncate
the name.

I suggest adding a test case for this; it would be easy to make a test data file using gnutar.

@halostatue
Copy link
Owner Author

I forked the code and placed it on github under http://www.github.com/atoulme/minitar

I made a new release of it (0.5.3) under the name minitar, with this patch. I still need to fix the tests and make it all work.

This is needed for Buildr

@halostatue halostatue self-assigned this Jul 1, 2016
@halostatue halostatue added this to the 1.0 milestone Jul 1, 2016
@halostatue
Copy link
Owner Author

Read is implemented as part of a future 0.6 release. The pre 1.0 versions will not support writing the long-filename format unless someone provides a patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant