[gnome-software/mwleeds/pwa-plugin] fixup! Revive webapp support



commit c0d5353fd33612412b6958b645e7a22d3e94bf61
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Fri Feb 25 13:15:16 2022 -0800

    fixup! Revive webapp support

 plugins/epiphany/gs-plugin-epiphany.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/plugins/epiphany/gs-plugin-epiphany.c b/plugins/epiphany/gs-plugin-epiphany.c
index 511c9e506..f47782a2d 100644
--- a/plugins/epiphany/gs-plugin-epiphany.c
+++ b/plugins/epiphany/gs-plugin-epiphany.c
@@ -480,14 +480,15 @@ list_installed_apps_thread_cb (GTask        *task,
                        g_autoptr(GFile) icon_file = g_file_new_for_path (icon_path);
                        g_autoptr(GIcon) icon = g_file_icon_new (icon_file);
                        g_autofree char *icon_dir = g_path_get_dirname (icon_path);
+                       g_autofree char *icon_dir_basename = g_path_get_basename (icon_dir);
                        const char *x;
                        int size = 0;
 
                        /* dir should be either scalable or e.g. 512x512 */
-                       if (g_strcmp0 (icon_dir, "scalable") == 0) {
+                       if (g_strcmp0 (icon_dir_basename, "scalable") == 0) {
                                /* Ensure scalable icons are preferred */
                                size = 4096;
-                       } else if ((x = strchr (icon_dir, 'x')) != NULL) {
+                       } else if ((x = strchr (icon_dir_basename, 'x')) != NULL) {
                                size = atoi (x + 1);
                        }
                        if (size > 0 && size <= 4096) {


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