[gnome-software/mwleeds/pwa-plugin] fixup! Fix epiphany self test



commit 2302abdbc2f5de66fb61c8e836dc0748be32d48c
Author: Phaedrus Leeds <mwleeds protonmail com>
Date:   Wed Mar 23 12:00:04 2022 -0700

    fixup! Fix epiphany self test

 plugins/epiphany/gs-plugin-epiphany.c | 8 +-------
 plugins/epiphany/gs-self-test.c       | 5 +++--
 2 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/plugins/epiphany/gs-plugin-epiphany.c b/plugins/epiphany/gs-plugin-epiphany.c
index 6e6e67d6b..bb4613488 100644
--- a/plugins/epiphany/gs-plugin-epiphany.c
+++ b/plugins/epiphany/gs-plugin-epiphany.c
@@ -486,13 +486,7 @@ list_installed_apps_thread_cb (GTask        *task,
 
                g_debug ("%s: Working on installed web app %s", G_STRFUNC, desktop_file_id);
 
-               if (g_getenv ("GS_SELF_TEST_EPIPHANY_TMP_DATA_DIR") == NULL) {
-                       desktop_info = g_desktop_app_info_new (desktop_file_id);
-               } else {
-                       g_autofree char *tmp_desktop_path = NULL;
-                       tmp_desktop_path = g_build_filename (g_get_user_data_dir (), desktop_file_id, NULL);
-                       desktop_info = g_desktop_app_info_new_from_filename (tmp_desktop_path);
-               }
+               desktop_info = g_desktop_app_info_new (desktop_file_id);
 
                if (desktop_info == NULL) {
                        g_warning ("Epiphany returned a non-existent or invalid desktop ID %s", 
desktop_file_id);
diff --git a/plugins/epiphany/gs-self-test.c b/plugins/epiphany/gs-self-test.c
index ef4361f34..20055e07c 100644
--- a/plugins/epiphany/gs-self-test.c
+++ b/plugins/epiphany/gs-self-test.c
@@ -143,7 +143,9 @@ create_fake_desktop_file (const char *app_id)
        "TryExec=true\n",
        app_id, icon_path, app_id);
 
-       desktop_path = g_strconcat (g_get_user_data_dir (), G_DIR_SEPARATOR_S, app_id, ".desktop", NULL);
+       desktop_path = g_strconcat (g_get_user_data_dir (), G_DIR_SEPARATOR_S,
+                                   "applications", G_DIR_SEPARATOR_S,
+                                   app_id, ".desktop", NULL);
 
        g_debug ("Creating a fake desktop file at path: %s", desktop_path);
        gs_mkdir_parent (desktop_path, &error);
@@ -212,7 +214,6 @@ main (int argc, char **argv)
 
        gs_test_init (&argc, &argv);
        g_setenv ("GS_XMLB_VERBOSE", "1", TRUE);
-       g_setenv ("GS_SELF_TEST_EPIPHANY_TMP_DATA_DIR", "1", TRUE);
 
        /* Set up mock D-Bus services for the Epiphany WebAppProvider and the
         * DynamicLauncher portal


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