summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-06-28 15:18:45 +0100
committerRobert Ancell <robert.ancell@canonical.com>2017-06-28 15:26:03 +0100
commit20f7ec0c57a62adab536af4eb4e2ab7e68e89627 (patch)
treec6c1b5abc13825308257ecf7538a7377c9d5455a
parentafc7fd7fe50850b7092d141a06796a8e52409ae5 (diff)
downloadappstream-glib-20f7ec0c57a62adab536af4eb4e2ab7e68e89627.tar.gz
Skip loading desktop data from Snap directory.
Don't load data from the snap directory, this information is provided by snapd.
-rw-r--r--libappstream-glib/as-store.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index 781e8c3..b340f24 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -2948,6 +2948,10 @@ as_store_search_per_system (AsStore *store,
g_debug ("skipping %s as invalid", data_dirs[i]);
continue;
}
+ if (g_strstr_len (data_dirs[i], -1, "snapd/desktop") != NULL) {
+ g_debug ("skippping %s as invalid", data_dirs[i]);
+ continue;
+ }
if ((flags & AS_STORE_LOAD_FLAG_APP_INFO_SYSTEM) > 0) {
g_autofree gchar *dest = NULL;
dest = g_build_filename (data_dirs[i], "app-info", NULL);