[file-roller: 5/5] libarchive: simplified code
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [file-roller: 5/5] libarchive: simplified code
- Date: Sat, 12 Oct 2019 16:38:28 +0000 (UTC)
commit 2cc70443ff913f5bec21c95c91695499f7a62470
Author: Paolo Bacchilega <paobac src gnome org>
Date: Sat Oct 12 18:35:28 2019 +0200
libarchive: simplified code
src/fr-archive-libarchive.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
index 43716f82..18d7cbe6 100644
--- a/src/fr-archive-libarchive.c
+++ b/src/fr-archive-libarchive.c
@@ -114,14 +114,14 @@ fr_archive_libarchive_get_capabilities (FrArchive *archive,
capabilities = FR_ARCHIVE_CAN_STORE_MANY_FILES;
+ /* give priority to 7z* for 7z archives. */
if (strcmp (mime_type, "application/x-7z-compressed") == 0) {
- if (_g_program_is_available ("7za", check_command) ||
- _g_program_is_available ("7zr", check_command) ||
- _g_program_is_available ("7z", check_command))
+ if (_g_program_is_available ("7za", check_command)
+ || _g_program_is_available ("7zr", check_command)
+ || _g_program_is_available ("7z", check_command))
+ {
return capabilities;
-
- capabilities |= FR_ARCHIVE_CAN_READ_WRITE;
- return capabilities;
+ }
}
/* give priority to 7za that supports CAB files better. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]