[evince] comics: add support for bsdtar command
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] comics: add support for bsdtar command
- Date: Sun, 11 Jan 2015 10:37:34 +0000 (UTC)
commit 7cc1c17cba611a7f6195cbd70041123cbe9bc610
Author: Balló György <ballogyor gmail com>
Date: Sat Jan 10 18:02:38 2015 +0100
comics: add support for bsdtar command
bsdtar is able to extract all supported comics archive format.
https://bugzilla.gnome.org/show_bug.cgi?id=742721
backend/comics/comics-document.c | 24 ++++++++++++++++++++++++
1 files changed, 24 insertions(+), 0 deletions(-)
---
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index b9d60cd..4997ee8 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -361,6 +361,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = GNAUNRAR;
return TRUE;
}
+ comics_document->selected_command =
+ g_find_program_in_path ("bsdtar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = TAR;
+ return TRUE;
+ }
} else if (!strcmp (mime_type, "application/x-cbz") ||
!strcmp (mime_type, "application/zip")) {
@@ -387,6 +393,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = P7ZIP;
return TRUE;
}
+ comics_document->selected_command =
+ g_find_program_in_path ("bsdtar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = TAR;
+ return TRUE;
+ }
} else if (!strcmp (mime_type, "application/x-cb7") ||
!strcmp (mime_type, "application/x-7z-compressed")) {
@@ -410,6 +422,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = P7ZIP;
return TRUE;
}
+ comics_document->selected_command =
+ g_find_program_in_path ("bsdtar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = TAR;
+ return TRUE;
+ }
} else if (!strcmp (mime_type, "application/x-cbt") ||
!strcmp (mime_type, "application/x-tar")) {
/* tar utility (Tape ARchive) */
@@ -419,6 +437,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = TAR;
return TRUE;
}
+ comics_document->selected_command =
+ g_find_program_in_path ("bsdtar");
+ if (comics_document->selected_command) {
+ comics_document->command_usage = TAR;
+ return TRUE;
+ }
} else {
g_set_error (error,
EV_DOCUMENT_ERROR,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]