[gnome-software] trivial: Do not show a warning when profiling GsPluginDatadirApps



commit 7c732d42b345ccecba75fa2ca5639d16111d58a4
Author: Richard Hughes <richard hughsie com>
Date:   Mon Oct 21 08:27:28 2013 +0100

    trivial: Do not show a warning when profiling GsPluginDatadirApps

 src/gs-app.c                         |    2 +-
 src/plugins/gs-plugin-datadir-apps.c |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/gs-app.c b/src/gs-app.c
index 9438ee6..e2eae0d 100644
--- a/src/gs-app.c
+++ b/src/gs-app.c
@@ -229,7 +229,7 @@ gs_app_to_string (GsApp *app)
        if (priv->summary != NULL)
                g_string_append_printf (str, "\tsummary:\t%s\n", priv->summary);
        if (priv->description != NULL)
-               g_string_append_printf (str, "\tdescription:\t%lu\n", strlen (priv->description));
+               g_string_append_printf (str, "\tdescription:\t%s\n", priv->description);
        for (i = 0; i < priv->screenshots->len; i++) {
                ss = g_ptr_array_index (priv->screenshots, i);
                g_string_append_printf (str, "\tscreenshot-%02i:\t%s\n",
diff --git a/src/plugins/gs-plugin-datadir-apps.c b/src/plugins/gs-plugin-datadir-apps.c
index e7e48a1..e7f41a6 100644
--- a/src/plugins/gs-plugin-datadir-apps.c
+++ b/src/plugins/gs-plugin-datadir-apps.c
@@ -272,13 +272,14 @@ gs_plugin_refine_app (GsPlugin *plugin,
        ret = gs_plugin_datadir_apps_extract_desktop_data (plugin, app, fn, error);
        if (!ret)
                goto out;
-       gs_profile_stop (plugin->profile, profile_id);
 
        /* we know it's installed as we read the desktop file */
        gs_app_set_id_kind (app, GS_APP_ID_KIND_DESKTOP);
        if (gs_app_get_state (app) == GS_APP_STATE_UNKNOWN)
                gs_app_set_state (app, GS_APP_STATE_INSTALLED);
 out:
+       if (profile_id != NULL)
+               gs_profile_stop (plugin->profile, profile_id);
        g_free (profile_id);
        return ret;
 }


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