[gnome-software] epiphany: recognize if installed by jhbuild



commit d3226dfa70400863a836c0dd635a56882bc6ecbd
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Jan 4 18:43:09 2014 +0100

    epiphany: recognize if installed by jhbuild
    
    Look for epiphany in all components of $PATH, not just /usr/bin
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721468

 src/plugins/gs-plugin-epiphany.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-epiphany.c b/src/plugins/gs-plugin-epiphany.c
index c76e9da..0f43828 100644
--- a/src/plugins/gs-plugin-epiphany.c
+++ b/src/plugins/gs-plugin-epiphany.c
@@ -51,14 +51,19 @@ gs_plugin_get_name (void)
 void
 gs_plugin_initialize (GsPlugin *plugin)
 {
+       char *epiphany;
+
        plugin->priv = GS_PLUGIN_GET_PRIVATE (GsPluginPrivate);
 
        /* we can only work with epiphany */
-       if (!g_file_test ("/usr/bin/epiphany", G_FILE_TEST_EXISTS)) {
+       epiphany = g_find_program_in_path ("epiphany");
+       if (epiphany == NULL) {
                gs_plugin_set_enabled (plugin, FALSE);
                g_warning ("disabling '%s' as epiphany does not exist",
                           plugin->name);
        }
+
+       g_free (epiphany);
 }
 
 /**


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