[nautilus] Avoid spew in the common case of non-existing desktop metadata file



commit 4e47a409e990418f541ec9c5f5b5e1567eb04297
Author: Alexander Larsson <alexl redhat com>
Date:   Mon Feb 7 23:01:07 2011 +0100

    Avoid spew in the common case of non-existing desktop metadata file

 libnautilus-private/nautilus-desktop-metadata.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-desktop-metadata.c b/libnautilus-private/nautilus-desktop-metadata.c
index 9f5ce59..524a97a 100644
--- a/libnautilus-private/nautilus-desktop-metadata.c
+++ b/libnautilus-private/nautilus-desktop-metadata.c
@@ -105,8 +105,12 @@ load_metadata_keyfile (void)
 				   &error);
 
 	if (error != NULL) {
-		g_print ("Unable to open the desktop metadata keyfile: %s\n",
-			 error->message);
+		if (!g_error_matches (error,
+				      G_FILE_ERROR,
+				      G_FILE_ERROR_NOENT)) {
+			g_print ("Unable to open the desktop metadata keyfile: %s\n",
+				 error->message);
+		}
 
 		g_error_free (error);
 	}



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