summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Hughes <richard@hughsie.com>2015-09-08 17:22:55 +0100
committerRichard Hughes <richard@hughsie.com>2015-09-08 17:23:00 +0100
commit8950cfeae3cbf9cb93ef638e6e870fa3381fb431 (patch)
treee77bfca44897295fb5c4182674f4071221dff588
parent11c3eb9fe9e88998d119424a9fffbca186b08d6b (diff)
downloadappstream-glib-8950cfeae3cbf9cb93ef638e6e870fa3381fb431.tar.gz
Do not fail to validate firmware in AppStream with no screenshots
-rw-r--r--libappstream-glib/as-app-validate.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libappstream-glib/as-app-validate.c b/libappstream-glib/as-app-validate.c
index 6e1fc25..031c152 100644
--- a/libappstream-glib/as-app-validate.c
+++ b/libappstream-glib/as-app-validate.c
@@ -776,7 +776,11 @@ as_app_validate_screenshots (AsApp *app, AsAppValidateHelper *helper)
number_screenshots_min = 0;
}
- /* metainfo and firmware do not require any screenshots */
+ /* firmware does not need screenshots */
+ if (as_app_get_id_kind (app) == AS_ID_KIND_FIRMWARE)
+ number_screenshots_min = 0;
+
+ /* metainfo and inf do not require any screenshots */
if (as_app_get_source_kind (app) == AS_APP_SOURCE_KIND_METAINFO ||
as_app_get_source_kind (app) == AS_APP_SOURCE_KIND_INF)
number_screenshots_min = 0;