file-roller/file-roller-self-exe.patch

57 lines
2.6 KiB
Diff

Index: src/fr-archive.c
===================================================================
--- src/fr-archive.c.orig
+++ src/fr-archive.c
@@ -280,7 +280,8 @@ create_command_from_mime_type (FRArchive
filename,
FR_COMPRESS_PROGRAM_BZIP2);
} else if (is_mime_type (mime_type, "application/zip") ||
- is_mime_type (mime_type, "application/x-zip")) {
+ is_mime_type (mime_type, "application/x-zip") ||
+ is_mime_type (mime_type, "application/octet-stream")) {
archive->command = fr_command_zip_new (archive->process,
filename);
} else if (is_mime_type (mime_type, "application/x-zoo")) {
@@ -444,7 +445,8 @@ create_command_from_filename (FRArchive
if (file_extension_is (filename, ".zip")
|| file_extension_is (filename, ".ear")
|| file_extension_is (filename, ".jar")
- || file_extension_is (filename, ".war")) {
+ || file_extension_is (filename, ".war")
+ || file_extension_is (filename, ".exe")) {
archive->command = fr_command_zip_new (archive->process,
filename);
return (archive->command != NULL);
Index: src/main.c
===================================================================
--- src/main.c.orig
+++ src/main.c
@@ -74,6 +74,7 @@ FRFileTypeDescription file_type_desc[] =
{ FR_FILE_TYPE_COMPRESS, ".Z", "application/x-compress", NULL },
{ FR_FILE_TYPE_ISO, ".iso", "application/x-cd-image", NULL },
{ FR_FILE_TYPE_EAR, ".ear", "application/x-ear", N_("Ear (.ear)") },
+ { FR_FILE_TYPE_EXE, ".exe", "application/octet-stream", N_("Self-extracting zip (.exe)") },
{ FR_FILE_TYPE_GZIP, ".gz", "application/x-gzip", NULL},
{ FR_FILE_TYPE_JAR, ".jar", "application/x-jar", N_("Jar (.jar)")},
{ FR_FILE_TYPE_LHA, ".lzh", "application/x-lha", N_("Lha (.lzh)") },
@@ -103,6 +104,7 @@ FRCommandDescription command_desc[] = {
{ "tar", TRUE, TRUE, TRUE, FR_FILE_TYPE_TAR },
{ "zip", TRUE, TRUE, TRUE, FR_FILE_TYPE_ZIP },
{ "unzip", TRUE, FALSE, TRUE, FR_FILE_TYPE_ZIP },
+ { "zip", TRUE, TRUE, TRUE, FR_FILE_TYPE_EXE },
{ "rar", TRUE, TRUE, TRUE, FR_FILE_TYPE_RAR },
{ "gzip", TRUE, TRUE, FALSE, FR_FILE_TYPE_GZIP },
{ "bzip2", TRUE, TRUE, FALSE, FR_FILE_TYPE_BZIP2 },
Index: src/typedefs.h
===================================================================
--- src/typedefs.h.orig
+++ src/typedefs.h
@@ -93,6 +93,7 @@ typedef enum {
FR_FILE_TYPE_COMPRESS,
FR_FILE_TYPE_ISO,
FR_FILE_TYPE_EAR,
+ FR_FILE_TYPE_EXE,
FR_FILE_TYPE_GZIP,
FR_FILE_TYPE_JAR,
FR_FILE_TYPE_LHA,