summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorBalló György <[email protected]>2015-01-10 20:42:49 +0100
committerinfirit <[email protected]>2015-01-10 21:26:02 +0100
commitd8d4fcd1182e4295cb4307333a4af4ea3e3c75db (patch)
treee7d051049069826afbb5dc074f3fa67eba760cdf /backend
parente0782e058b729553335cfe76f96ba556e54b7f58 (diff)
downloadatril-d8d4fcd1182e4295cb4307333a4af4ea3e3c75db.tar.bz2
atril-d8d4fcd1182e4295cb4307333a4af4ea3e3c75db.tar.xz
comics backend: add support for bsdtar
bsdtar is able to extract all supported comics archive format.
Diffstat (limited to 'backend')
-rw-r--r--backend/comics/comics-document.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/backend/comics/comics-document.c b/backend/comics/comics-document.c
index bec8582f..da872ffb 100644
--- a/backend/comics/comics-document.c
+++ b/backend/comics/comics-document.c
@@ -368,6 +368,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")) {
@@ -381,6 +387,12 @@ comics_check_decompress_command (gchar *mime_type,
comics_document->command_usage = UNZIP;
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")) {
@@ -404,6 +416,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) */
@@ -413,6 +431,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,