diff options
author | Richard Hughes <richard@hughsie.com> | 2016-10-19 21:13:29 +0100 |
---|---|---|
committer | Richard Hughes <richard@hughsie.com> | 2016-10-19 21:13:29 +0100 |
commit | f6fb068d82865e9717304abfc518410109c58a9e (patch) | |
tree | 01c3da00e1eeac6486b57ec472c108efcde777cf | |
parent | b75081d19626e2b486c6d89ebfd8fcc2a83f3620 (diff) | |
download | appstream-glib-wip/hughsie/debian.tar.gz |
Ensure the component scope is set when loading yaml fileswip/hughsie/debian
-rw-r--r-- | libappstream-glib/as-store.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c index d5b9dd5..8c6f369 100644 --- a/libappstream-glib/as-store.c +++ b/libappstream-glib/as-store.c @@ -1433,6 +1433,7 @@ as_store_from_root (AsStore *store, static gboolean as_store_load_yaml_file (AsStore *store, GFile *file, + AsAppScope scope, GCancellable *cancellable, GError **error) { @@ -1501,6 +1502,7 @@ as_store_load_yaml_file (AsStore *store, if (icon_path != NULL) as_app_set_icon_path (app, icon_path); + as_app_set_scope (app, scope); as_app_set_source_kind (app, AS_APP_SOURCE_KIND_APPSTREAM); if (!as_app_node_parse_dep11 (app, app_n, ctx, error)) return FALSE; @@ -1715,9 +1717,13 @@ as_store_from_file_internal (AsStore *store, filename); /* a DEP-11 file */ - if (g_strstr_len (filename, -1, ".yml") != NULL) - return as_store_load_yaml_file (store, file, cancellable, error); - + if (g_strstr_len (filename, -1, ".yml") != NULL) { + return as_store_load_yaml_file (store, + file, + scope, + cancellable, + error); + } #ifdef HAVE_GCAB /* a cab archive */ if (g_str_has_suffix (filename, ".cab")) |