[gnome-software] trivial: Do not add empty keyword for invalid AppStream files



commit 6f647033834d9eb531b45bf617b4c09c50592c3f
Author: Richard Hughes <richard hughsie com>
Date:   Thu Jan 28 19:32:13 2016 +0000

    trivial: Do not add empty keyword for invalid AppStream files

 src/plugins/gs-plugin-appstream.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 4c66932..a140970 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -209,7 +209,7 @@ gs_plugin_appstream_startup (GsPlugin *plugin, GError **error)
        for (i = 0; i < items->len; i++) {
                app = g_ptr_array_index (items, i);
                origin = as_app_get_origin (app);
-               if (origin == NULL)
+               if (origin == NULL || origin[0] == '\0')
                        continue;
                perc = g_hash_table_lookup (origins, origin);
                if (*perc < 10) {


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