David Haller
Hello,
On Thu, 22 Aug 2013, Cristian Rodríguez wrote:
El 22/08/13 15:19, dieter escribió:
mkdir testdir echo test > "testdir/testname_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789.txt" tar cJf testdir.tar.xz testdir
start mc, enter testdir.tar.xz the filename is limited to testname_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123
The tar archive itself is correct and tar xf correctly restores the full file-names. [..] The problem is observed with the mc packages included in 12.3 (mc-4.8.1.4-2.1.2) and also with 13.1M4/factory (mc-4.8.9-2.2).
Hrmm.. it might be some sort of primitive buffer overflow check or the plugin just shortens the filenames for display.. in any case, fill a bug report ;-)
==== mc-4.8.1.4/src/vfs/tar/tar.c ==== #define NAMSIZ 100 #define PREFIX_SIZE 155 ====
These are POSIX.1-1099 defines, don't change then unless you like to completemy break all.
Maybe we should replace that by a script /usr/lib/mc/extfs.d/tar using GNU tar, pax or star ... (i.e. write that script and compile without ENABLE_VFS_TAR i.e. --disable-vfs-tar). I strongly doubt that you can just change those defines. Joerg Schilling probably knows ...
OK, it seems that my last mail was too quick as the filename is split into prefix and rest, but if you only support POSIX.1-1988, you cannot support path names that end in a name component that is longer than 100 chars. Up to the 1990s, people did not really have a problem with that but now that even Microsoft left filesystem stoneage, people use longer names and need tar support for that. The official way is to support POSIX.1-2001 enhencements, but this is not a trivial change. Anything that goes bejond supporting 100 + 155 is a larger change. But maybe, you like to have a look at /usr/share/mc/extfs.d/README and implement a wrapper to star. Star is a good choice as it supports many different archive types. BTW: I just see that /usr/share/mc/extfs.d/iso9660 is based on a very old isoinfo version. It would be much easier to use the build in find(1) via -find that is implemented using libfind. Jörg -- EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin js@cs.tu-berlin.de (uni) joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org