[gnome-software] datadir-apps: ignore ENOENT reading the .desktop filename



commit fcad66eeef60fc5f0619749e43a4cbd8b6f50818
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sun Sep 8 17:09:44 2013 +0200

    datadir-apps: ignore ENOENT reading the .desktop filename
    
    The desktopdb plugin can sometimes give us a non existing .desktop (for
    example if the cache was not regenerated after uninstalling the
    app), spare the warning in that case.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707728
    
    Signed-off-by: Richard Hughes <richard hughsie com>

 src/plugins/gs-plugin-datadir-apps.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/plugins/gs-plugin-datadir-apps.c b/src/plugins/gs-plugin-datadir-apps.c
index 2c8d639..1fc0233 100644
--- a/src/plugins/gs-plugin-datadir-apps.c
+++ b/src/plugins/gs-plugin-datadir-apps.c
@@ -253,9 +253,11 @@ gs_plugin_refine (GsPlugin *plugin,
                                                                   tmp,
                                                                   &error_local);
                if (!ret) {
-                       g_warning ("failed to extract desktop data for %s: %s",
-                                  gs_app_get_id (app),
-                                  error_local->message);
+                       if (!g_error_matches (error_local, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+                               g_warning ("failed to extract desktop data for %s: %s",
+                                          gs_app_get_id (app),
+                                          error_local->message);
+                       }
                        g_clear_error (&error_local);
                        continue;
                }


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