From 9b36119e1ed8ae7c2bec341143c343a9d73dcdd8 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Tue, 23 Aug 2016 14:42:33 +0100 Subject: trivial: Restrict the bundle kind when parsing local files This means we don't wildcard match against user non-package apps. --- libappstream-glib/as-store.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c index b3bf57b..5f72997 100644 --- a/libappstream-glib/as-store.c +++ b/libappstream-glib/as-store.c @@ -2550,6 +2550,13 @@ as_store_load_installed (AsStore *store, return FALSE; } + /* don't match against non-package apps in the store */ + if (scope == AS_APP_SCOPE_SYSTEM && + g_str_has_prefix (path, "/usr/share")) { + as_app_set_trust_flags (app, AS_APP_TRUST_FLAG_COMPLETE); + as_app_add_pkgname (app, ""); + } + /* set the ID prefix */ if ((priv->add_flags & AS_STORE_ADD_FLAG_USE_UNIQUE_ID) == 0) as_store_fixup_id_prefix (app, as_app_scope_to_string (scope)); -- cgit v1.2.1