[gnome-software/1454-allow-searching-for-extensions] flatpak: Do not claim ownership of a wildcard app



commit bb25be79118cd7589486b71b7188f822bff8bf14
Author: Milan Crha <mcrha redhat com>
Date:   Mon Sep 27 17:49:19 2021 +0200

    flatpak: Do not claim ownership of a wildcard app
    
    The gs_flatpak_claim_app_list() can receive wildcard apps, which
    should not have set the management plugin.

 plugins/flatpak/gs-flatpak.c | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 86baa093d..d5c1a6dc1 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -161,6 +161,10 @@ gs_flatpak_claim_app_list (GsFlatpak *self,
        for (guint i = 0; i < gs_app_list_length (list); i++) {
                GsApp *app = gs_app_list_index (list, i);
 
+               /* Do not claim ownership of a wildcard app */
+               if (gs_app_has_quirk (app, GS_APP_QUIRK_IS_WILDCARD))
+                       continue;
+
                if (gs_app_get_origin (app))
                        gs_flatpak_set_app_origin (self, app, gs_app_get_origin (app), NULL, NULL);
 


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