[gcab] trivial: Handle the duplicate handling in the same way when adding folders
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcab] trivial: Handle the duplicate handling in the same way when adding folders
- Date: Thu, 14 Dec 2017 13:35:46 +0000 (UTC)
commit 243f44ceb7e9787b9b9d11c7cd135481c10040ff
Author: Richard Hughes <richard hughsie com>
Date: Tue Dec 12 21:34:43 2017 +0000
trivial: Handle the duplicate handling in the same way when adding folders
When we add duplicate files we get an error, so adding duplicate folders should
give us the same thing.
libgcab/gcab-folder.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/libgcab/gcab-folder.c b/libgcab/gcab-folder.c
index b790178..e9bb1a2 100644
--- a/libgcab/gcab-folder.c
+++ b/libgcab/gcab-folder.c
@@ -221,9 +221,8 @@ add_file_info (GCabFolder *self, GCabFile *file, GFileInfo *info,
g_autofree gchar *child_name = g_build_path ("\\", name, g_file_info_get_name (info), NULL);
g_autoptr(GCabFile) child_file = gcab_file_new_with_file (child_name, child);
if (!add_file_info (self, child_file, info, child_name, recurse, error)) {
- g_warning ("Couldn't add file %s: %s",
- child_name, (*error)->message);
- g_clear_error (error);
+ g_object_unref (info);
+ return FALSE;
}
g_object_unref (info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]