summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-07-01 12:03:37 +0100
committerRichard Hughes <richard@hughsie.com>2015-07-01 12:04:11 +0100
commit3ba6c79e8e22cc02f93fabf0809294bdf5e59785 (patch)
tree8a7c6f339fb004696f6f03d56946c7b0d42dbe64
parent46a48c4253bee029ad597e144dcf0a7a04f3c9dd (diff)
downloadappstream-glib-3ba6c79e8e22cc02f93fabf0809294bdf5e59785.tar.gz
Ignore the prefix when loading system-wide AppStream information
We actually want to use the distro-provided data in this case.
-rw-r--r--libappstream-glib/as-store.c8
1 files changed, 8 insertions, 0 deletions
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 */