-
Notifications
You must be signed in to change notification settings - Fork 3
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
file name length limit (in tar archive) #2201
Comments
|
There's no limit filename length. The problem is in "tar.c" in vfs implementation.
The file you appended has "TAR_USTAR" header that but it seems store long names as "TAR_GNU". Gnu tar (the standard command line utility) handles these correctly. Yet I'm not sure if this file is valid or if it works due to gnu tar workarounds.
The tar format is ancient - there are many versions and options of header encoding. Does anybody know it? There's another issue with long names - #2306. I've looked at gnu tar source code - it looks much more complex than current mc implementation. How about to port some code from gnu tar to mc? Both are GPL licensed :-)
The tar.c in mc needs some serious love... |
Replying to jendap:
No love. tar vfs will be reimplemented as extfs plugin based on gnu tar. |
perfect! that should solve all the issues with tar.
thanks! |
In general, the TarVFS is scheduled for total reimplementation. But this fix is useful for stable releases.
Thanks AVFS (avf.sf.net) for the code of this fix.
Branch: 2201_tar_filename_length (parent: master) |
|
|
I'm reopening this issue because [1] is still unresolved. I've spent some time trying to track down the error in the code and as far as I can tell the information is just missing. NAMSIZ is set to 100 and everything afterwards is cut off. From what I understand, the filename is not even completely read into record.charptr. |
|
There is tar extsfs script in the linked Suse bug, by the way, I can ask them if they have a newer version... is the current thinking still to replace it with an extfs plugin? |
Replying to zaytsev:
Probably, #1952 is the better place to discuss of move TAR VFS from internal C implementation to EXTFS script. |
|
|
Important
This issue was migrated from Trac:
helix84
(helix84@….sk)szotsaki@….com
Steps to reproduce:
Navigate deeply into an archive containing long directory/file names.
Alternately, extract the contents of such archive.
The filenames will be cut off at some point.
Example:
1) wget http://sourceforge.net/projects/dspace/files/DSpace%20Stable/1.6.0/dspace-1.6.0-src-release.tar.bz2/download
2) navigate into the archive in mc
3) try to copy (extract) the contents of the archive
4) you will get overwrite prompt: "Target file "/home/dspac~DConfigura" already exists!"
Problem:
The filenames are cut off at about 100 characters (length of the whole path inside the archive).
Proposed solution:
a) remove the limit
b) warn about this limit when entering the archive if the limit is reached for the archive being opened
The text was updated successfully, but these errors were encountered: