GNOME Bugzilla – Bug 558023
Fails to handle cpio archives created with libarchive
Last modified: 2010-08-26 08:50:42 UTC
+++ This bug was initially created as a clone of Bug #557802 +++ CPIO archives created with libarchive is not handled correct in file-foller. Even if the file list is shown, and this file list reviels that files contains data opening the same files from within file-roller for instance with gedit displays empty files. Using gzip to compress those same archives semi crashes file-roller. Taken those same archives a feeding plain old CPIO with them shows no problems what so ever. I have a hunch to where the bug is to be found. The reason, IMHO, is caused by the fact that the archives in question is all created preserving absolute file names so the behavour shown by file-roller is simply displaying the archives index but then fails utterly when trying to find out where those files contained in the archive is placed after they have been copied to the file system. A have attached to example archives which proofes the above. PS. the archives is created with a plugin, I have written myself, for claws-mail so if somebody wants a first hand knowledge of the problem grab claws-mail + claws-mail-extra-plugin. The application is available in any GNU/Linux and *BSD distribution. This insitense was first reported to bugs.debian.org: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=502785 One of the Ubuntu maintainers, Emilio Pozuelo Monfort <pochu@ubuntu.com>, has verified that this behavour also is an issue with file-roller 2.24. If you need any further input or want me to provide a small dedicated code example involving libarchive please let me know.
2 patches provided to solve the issue is uploaded to http://bugzilla.gnome.org/show_bug.cgi?id=557802
Created attachment 121479 [details] [review] Cumulative patch to solve both issues. This patch contains fixes for both handling archives with absolute file names as well as handling compressed CPIO archives. Again, I am only able to verify gzip and bzip2 so commented out the code I have made for handling other compressions too.
Created attachment 121481 [details] [review] A small bug in the privous patch
Created attachment 121488 [details] [review] fixes bug related to extracting selected files This patch requires adding my previous patch to solve compressed CPIO archives. It solves the issue which prevents extracting selected files when CPIO archives has absolute file names.
Created attachment 121539 [details] [review] more secure way of handling extract selected This patch is more secure and is more true to file-roller's GObject nature.
*** Bug 558016 has been marked as a duplicate of this bug. ***
This problem has been fixed in the development version. I found an easier way to fix the problem, thanks for your patch and sorry for the delay.