GNOME Bugzilla – Bug 639664
Zip compression fails with filenames starting with a hyphen
Last modified: 2011-02-11 19:27:51 UTC
The bug was originally reported at: https://bugs.launchpad.net/ubuntu/+source/file-roller/+bug/671691 While compressing zip archives file-roller invokes zip [opts] [files]. If a file starts with a hyphen, zip fails because it thinks that an unknown option comes. I've attached a simple patch which makes file-roller to call zip [opts] -- [files] instead. Please find the patch attached under https://bugs.launchpad.net/ubuntu/+source/file-roller/+bug/671691
patch applied to master, thank you.
It seems the addition of this patch leads to a problem in the current package in Ubuntu 11.04 (2.32.1-0ubuntu2): Extracting files (e.g. by "Extract here") now fails with an error "caution: filename not matched: --" (https://bugs.launchpad.net/ubuntu/+source/file-roller/+bug/705698). It works when p7zip is used instead of unzip, though.
It seems that the arguments are misplaced on the git commit : http://git.gnome.org/browse/file-roller/commit/?id=db930e241d450a068e25a9cecb175ea96f787375 If I replaced it by + fr_process_add_arg (comm->process, "--"); fr_process_add_arg (comm->process, comm->filename); it seems to work.
Before commiting my patch I checked the extraction process. It worked well for me. Probably applying the patch to the other fr commands was too much in the commit. I will check the behaviour ASAP.
current master should be ok now.