[PATCH] nautilus_directory_get_file_metadata returns unexpected values



The fix should be quiet obvious. In some cases,
nautilus_directory_get_file_metadata returns unexpected values. This
partially fixes [1].

[1] http://bugzilla.gnome.org/show_bug.cgi?id=308977

-- 
Christian Neumair <chris gnome-de org>
Index: libnautilus-private/nautilus-directory-metafile.c
===================================================================
RCS file: /cvs/gnome/nautilus/libnautilus-private/nautilus-directory-metafile.c,v
retrieving revision 1.47
diff -u -p -r1.47 nautilus-directory-metafile.c
--- libnautilus-private/nautilus-directory-metafile.c	26 Apr 2002 19:41:58 -0000	1.47
+++ libnautilus-private/nautilus-directory-metafile.c	30 Sep 2005 21:57:11 -0000
@@ -192,9 +192,9 @@ nautilus_directory_get_file_metadata (Na
 	const char       *non_null_default;
 	CORBA_char       *corba_value;
 
-	g_return_val_if_fail (NAUTILUS_IS_DIRECTORY (directory), NULL);
-	g_return_val_if_fail (!eel_str_is_empty (file_name), NULL);
-	g_return_val_if_fail (!eel_str_is_empty (key), NULL);
+	g_return_val_if_fail (NAUTILUS_IS_DIRECTORY (directory), g_strdup (default_metadata));
+	g_return_val_if_fail (!eel_str_is_empty (file_name), g_strdup (default_metadata));
+	g_return_val_if_fail (!eel_str_is_empty (key), g_strdup (default_metadata));
 	
 	/* We can't pass NULL as a CORBA_string - pass "" instead. */
 	non_null_default = default_metadata != NULL ? default_metadata : "";

Attachment: signature.asc
Description: This is a digitally signed message part



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