appdata: When looking for appdata, find canonical name first

bijben had both a metainfo and an appdata, which caused EEXIST when
renaming the file.
tingping/wmclass
Alexander Larsson 2017-11-07 15:39:32 +01:00
parent a177961181
commit 426e664b7a
1 changed files with 5 additions and 2 deletions

View File

@ -2131,13 +2131,16 @@ static GFile *
builder_manifest_find_appdata_file (BuilderManifest *self,
GFile *app_root)
{
/* We order these so that share/appdata/*.appdata.xml if found
first, as this is the target name, and apps may have both, which will
cause issues with the rename. */
const char *extensions[] = {
".metainfo.xml",
".appdata.xml",
".metainfo.xml",
};
const char *dirs[] = {
"share/metainfo",
"share/appdata",
"share/metainfo",
};
g_autoptr(GFile) source = NULL;