summaryrefslogtreecommitdiff
path: root/common/flatpak-installed-ref.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/flatpak-installed-ref.c')
-rw-r--r--common/flatpak-installed-ref.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/common/flatpak-installed-ref.c b/common/flatpak-installed-ref.c
index 367f5d6a..c3f8048c 100644
--- a/common/flatpak-installed-ref.c
+++ b/common/flatpak-installed-ref.c
@@ -526,6 +526,8 @@ flatpak_installed_ref_load_appdata (FlatpakInstalledRef *self,
gsize length;
g_autofree char *path = NULL;
g_autofree char *appdata_name = NULL;
+ g_autofree char *appinfo_path = NULL;
+ g_autofree char *swcatalog_path = NULL;
if (priv->deploy_dir == NULL)
{
@@ -535,7 +537,15 @@ flatpak_installed_ref_load_appdata (FlatpakInstalledRef *self,
}
appdata_name = g_strconcat (flatpak_ref_get_name (FLATPAK_REF (self)), ".xml.gz", NULL);
- path = g_build_filename (priv->deploy_dir, "files/share/app-info/xmls", appdata_name, NULL);
+ appinfo_path = g_build_filename (priv->deploy_dir, "files/share/app-info/xmls", appdata_name, NULL);
+ swcatalog_path = g_build_filename (priv->deploy_dir, "files/share/swcatalog/xml/flatpak.xml.gz", NULL);
+
+ if (g_file_test (appinfo_path, G_FILE_TEST_EXISTS))
+ path = appinfo_path;
+ else if (g_file_test (swcatalog_path, G_FILE_TEST_EXISTS))
+ path = swcatalog_path;
+ else
+ return NULL;
if (!g_file_get_contents (path, &data, &length, error))
return NULL;