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 600131 - encrypt_header is left enabled when creating zip archives
encrypt_header is left enabled when creating zip archives
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.28.x
Other Linux
: Normal normal
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
Depends on:
Blocks:
 
 
Reported: 2009-10-30 13:59 UTC by Pedro Villavicencio
Modified: 2009-10-30 18:05 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28



Description Pedro Villavicencio 2009-10-30 13:59:34 UTC
this report has been filed here:

https://bugs.edge.launchpad.net/ubuntu/+source/file-roller/+bug/464324

"Steps to recreate:
Right click a file to bring up the compression dialog.
Select the 7z format.
Under other options: enter a password, and check "Encrypt the file list too"
Click create.

Compress another file in the zip format, and enter a password.
"Encrypt the file list too" will be checked, but greyed out.
Clicking create will generate the following error.
---------------------------
7-Zip 9.04 beta Copyright (c) 1999-2009 Igor Pavlov 2009-05-30
p7zip Version 9.04 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,2 CPUs)
Scanning

Creating archive /home/greg/Desktop/f143963072.jpg.zip

System error:
E_INVALIDARG
---------------------------
This is the same error received when using 7z with -tzip -mhe=on
mhe=on can only be used with the 7z format.

A quick way to uncheck it is to use:
gconftool-2 --type bool --set /apps/file-roller/general/encrypt_header false"

"

One possible solution:
fr-command-7z.c:
Original:
--------------
if (is_mime_type (comm->mime_type, "application/zip"))
  fr_process_add_arg (comm->process, "-tzip");

 fr_process_add_arg (comm->process, "-bd");
 fr_process_add_arg (comm->process, "-y");
 fr_process_add_arg (comm->process, "-l");
 add_password_arg (comm, comm->password, FALSE);
 if ((comm->password != NULL) && (*comm->password != 0) && comm->encrypt_header)
  fr_process_add_arg (comm->process, "-mhe=on");
--------------

Change:
--------------
 fr_process_add_arg (comm->process, "-bd");
 fr_process_add_arg (comm->process, "-y");
 fr_process_add_arg (comm->process, "-l");
 add_password_arg (comm, comm->password, FALSE);

if (is_mime_type (comm->mime_type, "application/zip"))
  fr_process_add_arg (comm->process, "-tzip");
else
 if ((comm->password != NULL) && (*comm->password != 0) && comm->encrypt_header)
  fr_process_add_arg (comm->process, "-mhe=on");
--------------
"

Thanks in advance,
Comment 1 Paolo Bacchilega 2009-10-30 17:48:47 UTC
fixed in master and gnome-2-28 branches , thanks.
Comment 2 Pedro Villavicencio 2009-10-30 18:05:38 UTC
You rock Paolo, thanks a lot!.