[Issue 2065] Return value of std.file.exists() is inverted.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 12 13:55:27 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2065
------- Comment #3 from andrei at metalanguage.com 2008-05-12 15:55 -------
(In reply to comment #2)
> I'm having a hard time seeing how:
>
> return (result == 0xFFFFFFFF) ? 0 : 1;
>
> is different from:
>
> return result != 0xFFFFFFFF;
I see that revision 682 and before had:
return (result == 0xFFFFFFFF) ? 0 : 1;
which is correct. In revision 683 I fixed exists to return bool instead of int
(just like $DEITY intended it) and in the process I introduced the bug:
return result == 0xFFFFFFFF;
The one I recently checked into dsource has:
return result != 0xFFFFFFFF;
which should fix the bug. Sorry for the mistake.
--
More information about the Digitalmars-d-bugs
mailing list