After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 639664 - Zip compression fails with filenames starting with a hyphen
Zip compression fails with filenames starting with a hyphen
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.30.x
Other Linux
: Normal minor
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
Depends on:
Blocks:
 
 
Reported: 2011-01-16 13:32 UTC by Dmitri Bachtin
Modified: 2011-02-11 19:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dmitri Bachtin 2011-01-16 13:32:34 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
Comment 1 Paolo Bacchilega 2011-01-17 10:04:30 UTC
patch applied to master, thank you.
Comment 2 Marcel Stimberg 2011-01-23 18:27:46 UTC
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.
Comment 3 Julien Lavergne 2011-01-23 22:13:48 UTC
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.
Comment 4 Dmitri Bachtin 2011-01-24 01:16:37 UTC
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.
Comment 5 Paolo Bacchilega 2011-02-11 19:27:51 UTC
current master should be ok now.