From 924d71d5d20f6a8291bb4e1a87f2ff8540c997f6 Mon Sep 17 00:00:00 2001 From: Phaedrus Leeds Date: Wed, 10 Nov 2021 11:55:48 -0800 Subject: [PATCH] app: Check appstream file not found error code Now that we switched from appstream-glib we don't need this hack. See https://github.com/ximion/appstream/pull/362 --- app/flatpak-builtins-utils.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/flatpak-builtins-utils.c b/app/flatpak-builtins-utils.c index ef204b7e..8b83193f 100644 --- a/app/flatpak-builtins-utils.c +++ b/app/flatpak-builtins-utils.c @@ -1137,11 +1137,9 @@ flatpak_dir_load_appstream_store (FlatpakDir *self, success = (local_error == NULL); #endif - /* We want to ignore ENOENT error as it is harmless and valid - * FIXME: appstream-glib doesn't have granular file-not-found error - * See: https://github.com/hughsie/appstream-glib/pull/268 */ + /* We want to ignore ENOENT error as it is harmless and valid */ if (local_error != NULL && - g_str_has_suffix (local_error->message, "No such file or directory")) + g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_NOT_FOUND)) g_clear_error (&local_error); else if (local_error != NULL) g_propagate_error (error, g_steal_pointer (&local_error));