[gnome-software] epiphany plugin: Avoid adding .desktop prefix twice



commit bfa522261ff15aa61a820608693208feff84dd33
Author: Kalev Lember <kalevlember gmail com>
Date:   Fri Aug 22 18:43:16 2014 +0200

    epiphany plugin: Avoid adding .desktop prefix twice
    
    gs_app_get_id() already returns the full desktop file name, no need to
    concatenate one more ".desktop" to it.

 src/plugins/gs-plugin-epiphany.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/src/plugins/gs-plugin-epiphany.c b/src/plugins/gs-plugin-epiphany.c
index 28d39bf..2010c74 100644
--- a/src/plugins/gs-plugin-epiphany.c
+++ b/src/plugins/gs-plugin-epiphany.c
@@ -609,7 +609,6 @@ static gboolean
 gs_plugin_refine_app (GsPlugin *plugin, GsApp *app, GError **error)
 {
        gboolean ret;
-       gchar *filename = NULL;
        gchar *path = NULL;
        gchar *filename_icon = NULL;
        gchar *hash;
@@ -654,10 +653,9 @@ gs_plugin_refine_app (GsPlugin *plugin, GsApp *app, GError **error)
                goto out;
 
        /* save file */
-       filename = g_strdup_printf ("%s.desktop", gs_app_get_id (app));
        path = g_build_filename (g_get_user_data_dir (),
                                 "applications",
-                                filename,
+                                gs_app_get_id (app),
                                 NULL);
        ret = gs_plugin_write_file (app, path, error);
        if (!ret)
@@ -670,7 +668,6 @@ gs_plugin_refine_app (GsPlugin *plugin, GsApp *app, GError **error)
 out:
        g_free (hash);
        g_free (path);
-       g_free (filename);
        g_free (filename_icon);
        return ret;
 }


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