From a07a80ff288e71e114cac20ea33f89a9f03e7e0d Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Mon, 3 Dec 2018 14:57:33 +0000 Subject: [PATCH] Fix a regression when doing GetReleases on unsupported hardware With an indexed string we can return INVALID_ARGUMENT before the query actually runs if nothing matches. --- src/fu-engine.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fu-engine.c b/src/fu-engine.c index 8f6dc40fb..9c61bbb7c 100644 --- a/src/fu-engine.c +++ b/src/fu-engine.c @@ -2520,7 +2520,8 @@ fu_engine_get_releases_for_device (FuEngine *self, FuDevice *device, GError **er } components = xb_silo_query (self->silo, xpath->str, 0, &error_local); if (components == NULL) { - if (g_error_matches (error_local, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) { + if (g_error_matches (error_local, G_IO_ERROR, G_IO_ERROR_NOT_FOUND) || + g_error_matches (error_local, G_IO_ERROR, G_IO_ERROR_INVALID_ARGUMENT)) { g_set_error (error, FWUPD_ERROR, FWUPD_ERROR_NOTHING_TO_DO,