summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/comics/comics-document.c32
1 files changed, 30 insertions, 2 deletions
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index 841524e7..9f945c6f 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -45,7 +45,8 @@ typedef enum
GNAUNRAR,
UNZIP,
P7ZIP,
- TAR
+ TAR,
+ UNARCHIVER
} ComicBookDecompressType;
typedef struct _ComicsDocumentClass ComicsDocumentClass;
@@ -107,7 +108,10 @@ static const ComicBookDecompressCommand command_usage_def[] = {
{NULL , "%s l -- %s" , "%s x -y %s -o%s", FALSE, OFFSET_7Z},
/* tar */
- {"%s -xOf" , "%s -tf %s" , NULL , FALSE, NO_OFFSET}
+ {"%s -xOf" , "%s -tf %s" , NULL , FALSE, NO_OFFSET},
+
+ /* UNARCHIVER */
+ {"unar -o -" , "%s %s" , NULL , FALSE, NO_OFFSET}
};
static void comics_document_document_thumbnails_iface_init (EvDocumentThumbnailsInterface *iface);
@@ -356,6 +360,12 @@ comics_check_decompress_command (gchar *mime_type,
return TRUE;
}
comics_document->selected_command =
+ g_find_program_in_path ("lsar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = UNARCHIVER;
+ return TRUE;
+ }
+ comics_document->selected_command =
g_find_program_in_path ("bsdtar");
if (comics_document->selected_command) {
comics_document->command_usage = TAR;
@@ -380,6 +390,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = TAR;
return TRUE;
}
+ comics_document->selected_command =
+ g_find_program_in_path ("lsar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = UNARCHIVER;
+ return TRUE;
+ }
} else if (g_content_type_is_a (mime_type, "application/x-cb7") ||
g_content_type_is_a (mime_type, "application/x-7z-compressed")) {
@@ -409,6 +425,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = TAR;
return TRUE;
}
+ comics_document->selected_command =
+ g_find_program_in_path ("lsar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = UNARCHIVER;
+ return TRUE;
+ }
} else if (g_content_type_is_a (mime_type, "application/x-cbt") ||
g_content_type_is_a (mime_type, "application/x-tar")) {
/* tar utility (Tape ARchive) */
@@ -424,6 +446,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = TAR;
return TRUE;
}
+ comics_document->selected_command =
+ g_find_program_in_path ("lsar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = UNARCHIVER;
+ return TRUE;
+ }
} else {
g_set_error (error,
EV_DOCUMENT_ERROR,