]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Also parse metainfo.xml as installed appdata files
authorMichael Schroeder <mls@suse.de>
Wed, 18 Nov 2015 14:52:15 +0000 (15:52 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 18 Nov 2015 14:52:15 +0000 (15:52 +0100)
ext/repo_appdata.c

index 587322b1887d7bbd80ac983b5b044449d1e382d9..cbc42e42a612d447f87e4c9b42849542b2efac83 100644 (file)
@@ -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)