diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fr-command-7z.c | 8 | 
1 files changed, 8 insertions, 0 deletions
| diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c index 0b784f7..316df11 100644 --- a/src/fr-command-7z.c +++ b/src/fr-command-7z.c @@ -39,6 +39,7 @@  static void fr_command_7z_class_init  (FrCommand7zClass *class);  static void fr_command_7z_init        (FrCommand        *afile);  static void fr_command_7z_finalize    (GObject          *object); +static gboolean spd_support;  /* Parent Class */ @@ -110,6 +111,10 @@ list__process_line (char     *line,  				p7z_comm->old_style = TRUE;  			else  				p7z_comm->old_style = FALSE; +			if ((strcmp (version, "9.38") < 0) && (ver_len > 1) && (version[1] == '.')) +				spd_support = FALSE; +			else +				spd_support = TRUE;  		}  		else if (p7z_comm->old_style && (strncmp (line, "Listing archive: ", 17) == 0))  			p7z_comm->list_started = TRUE; @@ -326,6 +331,7 @@ fr_command_7z_add (FrCommand     *comm,  		fr_process_add_arg (comm->process, "-mem=AES128");  	} +	if (spd_support) fr_process_add_arg (comm->process, "-spd");  	fr_process_add_arg (comm->process, "-bd");  	fr_process_add_arg (comm->process, "-y");  	fr_process_add_arg (comm->process, "-l"); @@ -384,6 +390,7 @@ fr_command_7z_delete (FrCommand  *comm,  	fr_command_7z_begin_command (comm);  	fr_process_add_arg (comm->process, "d"); +	if (spd_support) fr_process_add_arg (comm->process, "-spd");  	fr_process_add_arg (comm->process, "-bd");  	fr_process_add_arg (comm->process, "-y");  	if (is_mime_type (comm->mime_type, "application/x-ms-dos-executable")) @@ -435,6 +442,7 @@ fr_command_7z_extract (FrCommand  *comm,  	else  		fr_process_add_arg (comm->process, "x"); +	if (spd_support) fr_process_add_arg (comm->process, "-spd");  	fr_process_add_arg (comm->process, "-bd");  	fr_process_add_arg (comm->process, "-y");  	add_password_arg (comm, comm->password, FALSE); | 
