[gnome-software] trivial: Parse AppStream with both <licence> and <project_license> tags
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] trivial: Parse AppStream with both <licence> and <project_license> tags
- Date: Wed, 26 Feb 2014 21:30:49 +0000 (UTC)
commit 5a29425478cdc8ca04f5733cadaf877a5f5c7a7d
Author: Richard Hughes <richard hughsie com>
Date: Wed Feb 26 21:17:24 2014 +0000
trivial: Parse AppStream with both <licence> and <project_license> tags
src/plugins/appstream-cache.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/appstream-cache.c b/src/plugins/appstream-cache.c
index d996777..5239eaf 100644
--- a/src/plugins/appstream-cache.c
+++ b/src/plugins/appstream-cache.c
@@ -767,15 +767,18 @@ appstream_cache_text_cb (GMarkupParseContext *context,
text, text_len);
break;
case APPSTREAM_TAG_PROJECT_LICENSE:
- if (helper->item_temp == NULL ||
- appstream_app_get_project_license (helper->item_temp) != NULL) {
+ if (helper->item_temp == NULL) {
g_set_error_literal (error,
APPSTREAM_CACHE_ERROR,
APPSTREAM_CACHE_ERROR_FAILED,
"item_temp license invalid");
return;
}
- appstream_app_set_project_license (helper->item_temp, text, text_len);
+ if (appstream_app_get_project_license (helper->item_temp) == NULL) {
+ appstream_app_set_project_license (helper->item_temp,
+ text,
+ text_len);
+ }
break;
case APPSTREAM_TAG_DESCRIPTION:
appstream_markup_add_content (helper->markup, text, text_len);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]