[gnome-software/gnome-3-20] trivial: Do not log a warning when trying to overwrite metadata keys



commit 2ce997359051b1423012f0331d28e0dc461b14a9
Author: Richard Hughes <richard hughsie com>
Date:   Wed Apr 13 16:30:48 2016 +0100

    trivial: Do not log a warning when trying to overwrite metadata keys

 src/plugins/gs-appstream.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-appstream.c b/src/plugins/gs-appstream.c
index 3f3a3c7..7dbf5d4 100644
--- a/src/plugins/gs-appstream.c
+++ b/src/plugins/gs-appstream.c
@@ -263,6 +263,8 @@ gs_appstream_copy_metadata (GsApp *app, AsApp *item)
        for (l = keys; l != NULL; l = l->next) {
                const gchar *key = l->data;
                const gchar *value = g_hash_table_lookup (hash, key);
+               if (gs_app_get_metadata_item (app, key) != NULL)
+                       continue;
                gs_app_set_metadata (app, key, value);
        }
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]