[gnome-software/misc-flatpak-fixes: 5/6] flatpak: Properly catch remote not found errors



commit af34d4061c4b1e859e110c354caac382a0517179
Author: Matthew Leeds <matthew leeds endlessm com>
Date:   Thu Jan 16 12:50:59 2020 -0800

    flatpak: Properly catch remote not found errors
    
    The error returned here changed in Flatpak 0.99.3, which is less than
    our required version, so update it. This prevents the following message
    when a flatpak bundle is opened:
    
    not handling error not-supported for action refine: failed to get origin-hostname: Remote "flatpak" not 
found

 plugins/flatpak/gs-flatpak.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 1188cf6f..a1fde7e7 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -1565,8 +1565,8 @@ gs_plugin_refine_item_origin_hostname (GsFlatpak *self, GsApp *app,
                                                           &error_local);
        if (xremote == NULL) {
                if (g_error_matches (error_local,
-                                    G_IO_ERROR,
-                                    G_IO_ERROR_NOT_FOUND)) {
+                                    FLATPAK_ERROR,
+                                    FLATPAK_ERROR_REMOTE_NOT_FOUND)) {
                        /* if the user deletes the -origin remote for a locally
                         * installed flatpakref file then we should just show
                         * 'localhost' and not return an error */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]