Dominique Leuenberger
1072a20f2e
- Add file-roller-ignore-unrar-if-wrapper.patch: Since unrar is non-free and it is planned to include a limited wrapper that would call unar, we should avoid this wrapper and call unar directly (bsc#1072118). - Add file-roller-rar-file-date.patch: fix wrong file date when using rar 5.30 or higher (bgo#758121). - Add file-roller-unar-dir-critical.patch: fix a warning when parsing lsar output (bgo#791505). OBS-URL: https://build.opensuse.org/request/show/556822 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/file-roller?expand=0&rev=260
31 lines
1.2 KiB
Diff
31 lines
1.2 KiB
Diff
From fe422f7c6b42a0d618b2b49999cfb2210f9ceca5 Mon Sep 17 00:00:00 2001
|
|
From: Mike Gorse <mgorse@suse.com>
|
|
Date: Mon, 11 Dec 2017 21:34:40 -0600
|
|
Subject: [PATCH] unarchiver: check that XADFileSize is set before reading it
|
|
|
|
Lsar does not set XADFileSize for directories, so we would output a
|
|
critical when encountering one.
|
|
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=791505
|
|
---
|
|
src/fr-command-unarchiver.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/src/fr-command-unarchiver.c b/src/fr-command-unarchiver.c
|
|
index a7cdb834..5e8fd705 100644
|
|
--- a/src/fr-command-unarchiver.c
|
|
+++ b/src/fr-command-unarchiver.c
|
|
@@ -91,7 +91,8 @@ list_command_completed (gpointer data)
|
|
|
|
entry = json_array_get_object_element (content, i);
|
|
fdata = file_data_new ();
|
|
- fdata->size = json_object_get_int_member (entry, "XADFileSize");
|
|
+ if (json_object_has_member (entry, "XADFileSize"))
|
|
+ fdata->size = json_object_get_int_member (entry, "XADFileSize");
|
|
fdata->modified = mktime_from_string (json_object_get_string_member (entry, "XADLastModificationDate"));
|
|
if (json_object_has_member (entry, "XADIsEncrypted"))
|
|
fdata->encrypted = json_object_get_int_member (entry, "XADIsEncrypted") == 1;
|
|
--
|
|
2.15.0
|
|
|