From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 Description of problem: When you point a symlink in a tar.gz / tar.bz2 archive mc shows only the first few letters from it (with most symlinks). Pressing F3 (view) works fine, but when you copy (F5) a file and a symlink to it the symlink is pointing to shorter name - strips characters again. Version-Release number of selected component (if applicable): mc-4.6.1-0.10 How reproducible: Always Steps to Reproduce: 1. make a dir with some files having long (20-30) character long names 2. make some symlinks to these files 3. archive these in .tar.bz2 file 4. browse the archive and inspect the links with mc Actual Results: Most symlinks get showed and extracted wrong (if not all) Additional info: Extracting files from archive with mc this way breaks almost all symlinks. I fill this bug against not officially released version because I tested it with the latest available one and the problem is still there.
Hello Doncho, I was able to reproduce the bug. I'm trying to fix it now. Thanks for the bugreport.
Hi Doncho, you might want to report this issue upstream (mc-devel). It might have been caused by the latest changes to tar.c or vfs in general.
Hi Leonard, I don't think this bug is very recent, I was able to reproduce it also with mc CVS checkout from 6th Sep.
Doncho, so I finally found a solution for the bug. That was *fun* to browse through all the vfs mc code to figure out that the broken extraction/viewing of symlinks from tarfs is actually caused by sloppy commit in upstream, 2th Sep. There is incorrectly calculated length of buf instead of link name in the inode. The random size you may see when extracting symlinks from tarfs is caused by the fact that buf is mostly uninitialized.
Created attachment 107544 [details] Fix for bad extraction/viewing of symlinks from tarfs
Switching severity back to high since this may lead to data loss/corruption.
Jindrich, please don't use UPSTREAM in vain :) . This resolution is ment for situations that will not be looked at downstream and might take a long time to get solved upstream. As this situation is now handled and the fix will be in a next release you better wait with closing this bug until the fix has trickled downstream (the next release), and then close it ERRATA or RAWHIDE or something.
Hello all. Using mc-4.6.1-0.10 as base I recompiled mc with this patch and it works for me (bouth browsing and extraction). Many thanks for the amazingly quick response and fix!