From: Michael Schroeder Date: Wed, 18 Nov 2015 14:52:15 +0000 (+0100) Subject: Also parse metainfo.xml as installed appdata files X-Git-Tag: 0.6.15~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abd0c285b833d168de262f2ecef9a05453fac575;p=thirdparty%2Flibsolv.git Also parse metainfo.xml as installed appdata files --- 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)