glib r6498 - trunk/gio



Author: alexl
Date: Mon Feb 11 12:21:49 2008
New Revision: 6498
URL: http://svn.gnome.org/viewvc/glib?rev=6498&view=rev

Log:
2008-02-11  Alexander Larsson  <alexl redhat com>

        * gfileinfo.c:
        (g_file_info_set_attribute_mask):
        (g_file_attribute_matcher_matches_id):
	Correctly handle NULL GAttributeMatcher meaning
	matches nothing. (Fixes #513492)



Modified:
   trunk/gio/ChangeLog
   trunk/gio/gfileinfo.c

Modified: trunk/gio/gfileinfo.c
==============================================================================
--- trunk/gio/gfileinfo.c	(original)
+++ trunk/gio/gfileinfo.c	Mon Feb 11 12:21:49 2008
@@ -343,7 +343,6 @@
   int i;
   
   g_return_if_fail (G_IS_FILE_INFO (info));
-  g_return_if_fail (mask != NULL);
   
   if (mask != info->mask)
     {
@@ -2035,7 +2034,9 @@
 g_file_attribute_matcher_matches_id (GFileAttributeMatcher *matcher,
                                      guint32                id)
 {
-  g_return_val_if_fail (matcher != NULL, FALSE);
+  /* We return a NULL matcher for an empty match string, so handle this */
+  if (matcher == NULL)
+    return FALSE;
   
   if (matcher->all)
     return TRUE;



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