[file-roller] for CAB files give priority to 7za that supports them better
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller] for CAB files give priority to 7za that supports them better
- Date: Wed, 28 Nov 2012 15:12:24 +0000 (UTC)
commit 8a0e30e097e972c7a76a9e5b07763f4e9968dd48
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Nov 28 15:59:42 2012 +0100
for CAB files give priority to 7za that supports them better
src/fr-archive-libarchive.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
index dd6fbe7..a48128d 100644
--- a/src/fr-archive-libarchive.c
+++ b/src/fr-archive-libarchive.c
@@ -30,6 +30,7 @@
#include <archive.h>
#include <archive_entry.h>
#include "file-data.h"
+#include "file-utils.h"
#include "fr-error.h"
#include "fr-archive-libarchive.h"
#include "glib-utils.h"
@@ -104,6 +105,13 @@ fr_archive_libarchive_get_capabilities (FrArchive *archive,
return capabilities;
}
+ /* give priority to 7za that supports CAB files better. */
+ if ((strcmp (mime_type, "application/vnd.ms-cab-compressed") == 0)
+ && _g_program_is_available ("7za", check_command))
+ {
+ return capabilities;
+ }
+
capabilities |= FR_ARCHIVE_CAN_READ;
/* read-only formats */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]