mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-09 18:54:04 +02:00
Correctly handle NULL GAttributeMatcher meaning matches nothing. (Fixes
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) svn path=/trunk/; revision=6498
This commit is contained in:
committed by
Alexander Larsson
parent
e3fdcd1fa7
commit
be85960df7
@@ -1,3 +1,11 @@
|
|||||||
|
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)
|
||||||
|
|
||||||
2008-02-11 Alexander Larsson <alexl@redhat.com>
|
2008-02-11 Alexander Larsson <alexl@redhat.com>
|
||||||
|
|
||||||
* gfile.[ch]:
|
* gfile.[ch]:
|
||||||
|
@@ -343,7 +343,6 @@ g_file_info_set_attribute_mask (GFileInfo *info,
|
|||||||
int i;
|
int i;
|
||||||
|
|
||||||
g_return_if_fail (G_IS_FILE_INFO (info));
|
g_return_if_fail (G_IS_FILE_INFO (info));
|
||||||
g_return_if_fail (mask != NULL);
|
|
||||||
|
|
||||||
if (mask != info->mask)
|
if (mask != info->mask)
|
||||||
{
|
{
|
||||||
@@ -2035,7 +2034,9 @@ static gboolean
|
|||||||
g_file_attribute_matcher_matches_id (GFileAttributeMatcher *matcher,
|
g_file_attribute_matcher_matches_id (GFileAttributeMatcher *matcher,
|
||||||
guint32 id)
|
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)
|
if (matcher->all)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
Reference in New Issue
Block a user