Re: gnome_vfs_file_info_matches patch - 2
- From: Alexander Larsson <alexl redhat com>
- To: Mathieu Lacage <mathieu_lacage myrealbox com>
- Cc: gnome-vfs-list gnome org
- Subject: Re: gnome_vfs_file_info_matches patch - 2
- Date: 17 Sep 2003 15:10:40 +0200
On Wed, 2003-09-17 at 13:50, Mathieu Lacage wrote:
> hi,
>
> Here is a revised version of the patch. As before, extensively tested,
> seems to work fine.
if (a->mime_type == NULL || b->mime_type == NULL) {
return a->mime_type == b->mime_type;
}
-
g_assert (a->mime_type != NULL && b->mime_type != NULL);
- return g_ascii_strcasecmp (a->mime_type, b->mime_type) == 0;
+
+ if (a->symlink_name == NULL || b->symlink_name == NULL) {
+ return a->symlink_name == b->symlink_name;
+ }
+ g_assert (a->symlink_name != NULL && b->symlink_name != NULL);
+
+ if (g_ascii_strcasecmp (a->mime_type, b->mime_type) == 0
+ && strcmp (a->symlink_name, b->symlink_name) == 0) {
+ return TRUE;
+ } else {
+ return FALSE;
+ }
}
This isn't right, you can't go on returning a == b all the time. What if
a->mimetype and b->mimetype is both NULL, but the symlink name is
different?
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alla lysator liu se
He's a time-tossed one-eyed gangster who hangs with the wrong crowd. She's a
brilliant thirtysomething advertising executive prone to fits of savage,
blood-crazed rage. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]