From b4312b8485db5cad8b58f8c517c379f41a673fb4 Mon Sep 17 00:00:00 2001 From: Joaquim Rocha Date: Tue, 27 Sep 2016 14:50:50 +0200 Subject: Fix setting the origin for Flatpak 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. --- libappstream-glib/as-store.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); } -- cgit v1.2.1