[gnome-software: 1/2] flatpak: Remove NEW_PERMISSIONS quirk if it doesn’t need to be set




commit efc99be16602a8845faa724b474aca6a0d3459fd
Author: Philip Withnall <pwithnall endlessos org>
Date:   Wed Jun 22 15:35:02 2022 +0100

    flatpak: Remove NEW_PERMISSIONS quirk if it doesn’t need to be set
    
    It’s feasible that `gs_flatpak_set_update_permissions()` could be called
    twice on the same `GsApp` instance, and end up clearing the permissions
    diff the second time round. If so, the quirks should be updated to
    match.
    
    It’s possible this fixes #1804, but a bit unlikely since I can’t
    actually see a way for `gs_flatpak_set_update_permissions()` to be
    called twice on the same `GsApp`.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1804

 plugins/flatpak/gs-flatpak.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index bc3e9d8e6..4df7c8cd5 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -490,6 +490,8 @@ gs_flatpak_set_update_permissions (GsFlatpak           *self,
 
        if (gs_app_permissions_get_flags (additional_permissions) != GS_APP_PERMISSIONS_FLAGS_NONE)
                gs_app_add_quirk (app, GS_APP_QUIRK_NEW_PERMISSIONS);
+       else
+               gs_app_remove_quirk (app, GS_APP_QUIRK_NEW_PERMISSIONS);
 }
 
 static void


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