[gnome-settings-daemon] color: Don't warn of nonexistent DMI file



commit 17fa00eaf914ebf07e1d320a0a8897f7e153573d
Author: Colin Walters <walters verbum org>
Date:   Thu Sep 13 11:05:33 2012 -0400

    color: Don't warn of nonexistent DMI file
    
    I don't have one in my QEMU system; since this is a normal condition,
    don't print an error.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683974

 plugins/color/gcm-dmi.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/color/gcm-dmi.c b/plugins/color/gcm-dmi.c
index 99d913f..9177f89 100644
--- a/plugins/color/gcm-dmi.c
+++ b/plugins/color/gcm-dmi.c
@@ -54,7 +54,8 @@ gcm_dmi_get_from_filename (const gchar *filename)
         /* get the contents */
         ret = g_file_get_contents (filename, &data, NULL, &error);
         if (!ret) {
-                g_warning ("failed to get contents of %s: %s", filename, error->message);
+		if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+			g_warning ("failed to get contents of %s: %s", filename, error->message);
                 g_error_free (error);
         }
 



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