[file-roller] check whether the file type supports header encryption



commit 2de96b9ec36409bcfc2ea370eae66a2d1b6fdd92
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Fri Oct 30 18:42:38 2009 +0100

    check whether the file type supports header encryption
    
    do use the header enprytion flags if the file type does not
    support it.
    
    [bug #600131]

 src/fr-command-7z.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c
index 858d2da..f039c0e 100644
--- a/src/fr-command-7z.c
+++ b/src/fr-command-7z.c
@@ -331,8 +331,13 @@ fr_command_7z_add (FrCommand     *comm,
 	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)
+	if ((comm->password != NULL)
+	    && (*comm->password != 0)
+	    && comm->encrypt_header
+	    && fr_command_is_capable_of (comm, FR_COMMAND_CAN_ENCRYPT_HEADER))
+	{
 		fr_process_add_arg (comm->process, "-mhe=on");
+	}
 
 	/* fr_process_add_arg (comm->process, "-ms=off"); FIXME: solid mode off? */
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]