Support appdata in share/metainfo also with rename-appdata-file

(cherry picked from commit b24228277d)
This commit is contained in:
Alexander Larsson committed 2017-02-06 15:10:32 +01:00
1 parent 817a069981
commit 6476774eb6
1 file changed
+6 -5
+6 -5
View File
@@ -1623,6 +1623,7 @@ builder_manifest_cleanup (BuilderManifest *self,
g_autoptr(GFile) appdata_dir = NULL;
g_autofree char *appdata_basename = NULL;
g_autoptr(GFile) appdata_file = NULL;
g_autoptr(GFile) appdata_source = NULL;
int i;
builder_manifest_checksum_for_cleanup (self, cache, context);
@@ -1672,16 +1673,16 @@ builder_manifest_cleanup (BuilderManifest *self,
}
app_root = g_file_get_child (app_dir, "files");
appdata_dir = g_file_resolve_relative_path (app_root, "share/appdata");
appdata_basename = g_strdup_printf ("%s.appdata.xml", self->id);
appdata_file = g_file_get_child (appdata_dir, appdata_basename);
if (!g_file_query_exists (appdata_file, NULL))
appdata_dir = g_file_resolve_relative_path (app_root, "share/appdata");
appdata_source = g_file_get_child (appdata_dir, self->rename_appdata_file ? self->rename_appdata_file : appdata_basename);
if (!g_file_query_exists (appdata_source, NULL))
{
g_object_unref (appdata_dir);
g_object_unref (appdata_file);
appdata_dir = g_file_resolve_relative_path (app_root, "share/metainfo");
appdata_file = g_file_get_child (appdata_dir, appdata_basename);
}
appdata_file = g_file_get_child (appdata_dir, appdata_basename);
if (self->rename_appdata_file != NULL)
{