summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Vogt <fvogt@suse.de>2022-02-08 15:50:40 +0100
committerRichard Hughes <richard@hughsie.com>2022-02-08 15:02:15 +0000
commit004a4e60e2433c404e7c36b94770c94e592db0fc (patch)
tree0efbdbd412021e1cfb3b66b9d9d88c8ed2090895
parent41c3b2e5e7ab9f45406298ba7d497fb473111546 (diff)
downloadappstream-glib-004a4e60e2433c404e7c36b94770c94e592db0fc.tar.gz
as-app: Also unwrap description in metainfo files
According to the specification, there is no difference between both kinds of upstream metainfo files. Fixes #381
-rw-r--r--libappstream-glib/as-app.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libappstream-glib/as-app.c b/libappstream-glib/as-app.c
index b65f08d..76c0727 100644
--- a/libappstream-glib/as-app.c
+++ b/libappstream-glib/as-app.c
@@ -4972,8 +4972,11 @@ as_app_node_parse_child (AsApp *app, GNode *n, guint32 flags,
/* <description> */
case AS_TAG_DESCRIPTION:
{
- /* unwrap appdata inline */
+ /* unwrap appdata and metainfo inline */
AsFormat *format = as_app_get_format_by_kind (app, AS_FORMAT_KIND_APPDATA);
+ if (format == NULL)
+ format = as_app_get_format_by_kind (app, AS_FORMAT_KIND_METAINFO);
+
if (format != NULL) {
GError *error_local = NULL;
g_autoptr(GHashTable) unwrapped = NULL;