From abd0c285b833d168de262f2ecef9a05453fac575 Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 18 Nov 2015 15:52:15 +0100 Subject: [PATCH] Also parse metainfo.xml as installed appdata files --- ext/repo_appdata.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ext/repo_appdata.c b/ext/repo_appdata.c index 587322b1..cbc42e42 100644 --- a/ext/repo_appdata.c +++ b/ext/repo_appdata.c @@ -664,10 +664,11 @@ repo_add_appdata_dir(Repo *repo, const char *appdatadir, int flags) const char *n; FILE *fp; int len = strlen(entry->d_name); - if (len <= 12 || strcmp(entry->d_name + len - 12, ".appdata.xml") != 0) - continue; if (entry->d_name[0] == '.') continue; + if (!(len > 12 && !strcmp(entry->d_name + len - 12, ".appdata.xml")) && + !(len > 13 && !strcmp(entry->d_name + len - 13, ".metainfo.xml"))) + continue; n = pool_tmpjoin(repo->pool, dirpath, "/", entry->d_name); fp = fopen(n, "r"); if (!fp) -- 2.47.2