From 3ba6c79e8e22cc02f93fabf0809294bdf5e59785 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Wed, 1 Jul 2015 12:03:37 +0100 Subject: Ignore the prefix when loading system-wide AppStream information We actually want to use the distro-provided data in this case. --- libappstream-glib/as-store.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c index 7a04d79..bf20f21 100644 --- a/libappstream-glib/as-store.c +++ b/libappstream-glib/as-store.c @@ -1797,6 +1797,14 @@ as_store_load (AsStore *store, g_ptr_array_add (app_info, path); path = g_build_filename (LOCALSTATEDIR, "cache", "app-info", NULL); g_ptr_array_add (app_info, path); + /* ignore the prefix; we actually want to use the + * distro-provided data in this case. */ + if (g_strcmp0 (LOCALSTATEDIR, "/var") != 0) { + path = g_build_filename ("/var", "lib", "app-info", NULL); + g_ptr_array_add (app_info, path); + path = g_build_filename ("/var", "cache", "app-info", NULL); + g_ptr_array_add (app_info, path); + } } /* per-user locations */ -- cgit v1.2.1