summaryrefslogtreecommitdiff
path: root/libappstream-glib
diff options
context:
space:
mode:
Diffstat (limited to 'libappstream-glib')
-rw-r--r--libappstream-glib/as-self-test.c2
-rw-r--r--libappstream-glib/as-store.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/libappstream-glib/as-self-test.c b/libappstream-glib/as-self-test.c
index b522291..6dde169 100644
--- a/libappstream-glib/as-self-test.c
+++ b/libappstream-glib/as-self-test.c
@@ -3025,7 +3025,7 @@ as_test_store_flatpak_func (void)
g_assert_cmpint (apps->len, ==, 1);
app = g_ptr_array_index (apps, 0);
g_assert_cmpstr (as_app_get_id (app), ==, "flatpak:test.desktop");
- g_assert_cmpstr (as_app_get_unique_id (app), ==, "*/flatpak/remote-name/desktop/test.desktop/x86_64/master");
+ g_assert_cmpstr (as_app_get_unique_id (app), ==, "system/flatpak/remote-name/desktop/test.desktop/x86_64/master");
g_assert_cmpstr (as_app_get_id_filename (app), ==, "test");
g_assert_cmpstr (as_app_get_origin (app), ==, "remote-name");
g_assert_cmpstr (as_app_get_source_file (app), ==, filename);
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index b1f50c7..00a6a77 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -1063,6 +1063,10 @@ as_store_from_root (AsStore *store,
str[0] = '\0';
id_prefix_app = g_strdup (source_basename);
}
+
+ /* although in ~, this is a system scope app */
+ if (g_strcmp0 (id_prefix_app, "flatpak") == 0)
+ scope = AS_APP_SCOPE_SYSTEM;
}
/* fallback */
@@ -1126,6 +1130,7 @@ as_store_from_root (AsStore *store,
as_app_set_icon_path (app, icon_path);
if (arch != NULL)
as_app_add_arch (app, arch);
+ as_app_set_scope (app, scope);
as_app_set_source_kind (app, AS_APP_SOURCE_KIND_APPSTREAM);
if (!as_app_node_parse (app, n, ctx, &error_local)) {
g_set_error (error,