[PATCH]: file-roller cannot open rar/zip files



Hello after this commit:
       Applied patch to fix bug #166658: Archives should only be
processed
        if command-line utility is present.
        Patch by Laszlo Kovacs <Laszlo Kovacs Sun COM>

Systems that have unrar/unzip but don't have rar/zip are not able to
open/extract those kind of files.

I think this is an important regression. As we are in such a big freeze,
I'm asking togheter to the maintainer and release team (time  time
time!).

Attached is the patch. I've tested it, but I'm Cc: bugsquad in order to
get more test.

Salu2
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/file-roller/ChangeLog,v
retrieving revision 1.327
diff -u -u -r1.327 ChangeLog
--- ChangeLog	28 Feb 2005 19:54:25 -0000	1.327
+++ ChangeLog	4 Mar 2005 17:35:24 -0000
@@ -1,3 +1,10 @@
+2005-03-04  Fernando Herrera  <fherrera onirica com>
+
+	* src/actions.c: (get_supported_archive_types),
+	* src/fr-command-rar.c: (fr_command_rar_new):
+	* src/fr-command-zip.c: (fr_command_zip_new): If unrar/unzip
+	are present, we can extrat those files.
+
 2005-02-28  Paolo Bacchilega  <paobac cvs gnome org>
 
 	[ File Roller 2.9.92 released ]
Index: src/actions.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/actions.c,v
retrieving revision 1.14
diff -u -u -r1.14 actions.c
--- src/actions.c	27 Feb 2005 20:01:28 -0000	1.14
+++ src/actions.c	4 Mar 2005 17:35:24 -0000
@@ -206,7 +206,11 @@
 		si++;
 		open_mime_type[oi] = g_strdup("application/x-rar");
 		oi++;
-        }
+        } else if (is_program_in_path ("unrar")) {
+		open_mime_type[oi] = g_strdup("application/x-rar");
+		oi++;
+	}
+
 
 	if (is_program_in_path ("rpm2cpio")) {
                 open_mime_type[oi] = g_strdup("application/x-rpm");
Index: src/fr-command-rar.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-rar.c,v
retrieving revision 1.15
diff -u -u -r1.15 fr-command-rar.c
--- src/fr-command-rar.c	28 Feb 2005 19:54:26 -0000	1.15
+++ src/fr-command-rar.c	4 Mar 2005 17:35:24 -0000
@@ -441,7 +441,7 @@
 {
 	FRCommand *comm;
 
-	if ((!is_program_in_path("rar")) ||
+	if ((!is_program_in_path("rar")) &&
 	    (!is_program_in_path("unrar"))) {
 		return NULL;
 	}
Index: src/fr-command-zip.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-zip.c,v
retrieving revision 1.17
diff -u -u -r1.17 fr-command-zip.c
--- src/fr-command-zip.c	16 Feb 2005 18:14:47 -0000	1.17
+++ src/fr-command-zip.c	4 Mar 2005 17:35:24 -0000
@@ -483,7 +483,7 @@
 {
 	FRCommand *comm;
 
-	if ((!is_program_in_path("zip")) ||
+	if ((!is_program_in_path("zip")) &&
 	    (!is_program_in_path("unzip"))) {
 		return NULL;
 	}


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