summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoaquim Rocha <jrocha@endlessm.com>2016-09-27 14:50:50 +0200
committerJoaquim Rocha <jrocha@endlessm.com>2016-09-27 14:50:50 +0200
commitb4312b8485db5cad8b58f8c517c379f41a673fb4 (patch)
tree49c5b0e7e01def41bd782bcf66b4aef82a5deb87
parente4e38f9788da6bf88607660f48df0038cc13b56e (diff)
downloadappstream-glib-wip/jrocha/fix-user-repos.tar.gz
Fix setting the origin for Flatpak user reposwip/jrocha/fix-user-repos
The origin was being stripped the first 8 characters so it would discard the "flatpak:" prefix. However, when on a user installation the prefix is "user-flatpak:" so the origin would erroneously be set to "tpak:gnome-apps". These changes discard the completely profile after checking for the prefix's delimiter.
-rw-r--r--libappstream-glib/as-store.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libappstream-glib/as-store.c b/libappstream-glib/as-store.c
index ccbd3bb..de5aba1 100644
--- a/libappstream-glib/as-store.c
+++ b/libappstream-glib/as-store.c
@@ -1309,7 +1309,6 @@ as_store_from_root (AsStore *store,
str = g_strrstr (source_basename, ".xml");
if (str != NULL) {
str[0] = '\0';
- origin_app = g_strdup (source_basename + 8);
origin_app_icons = g_strdup (source_basename);
}
@@ -1317,6 +1316,7 @@ as_store_from_root (AsStore *store,
str = g_strstr_len (source_basename, -1, origin_delim);
if (str != NULL) {
str[0] = '\0';
+ origin_app = g_strdup (str + 1);
id_prefix_app = g_strdup (source_basename);
}