August 28, 2005
int exists(char[] name)
{
*  return access(toStringz(name),0) != 0;

should be

*  return access(toStringz(name), 0) == 0;

0 is used as the success value for access, according to the man pages.  It should also return a bit/bool, not int.

Regards,
James Dunne
August 28, 2005
"James Dunne" <james.jdunne@gmail.com> wrote in message news:der1dj$2cs4$1@digitaldaemon.com...
> int exists(char[] name)
> {
> *  return access(toStringz(name),0) != 0;
>
> should be
>
> *  return access(toStringz(name), 0) == 0;
>
> 0 is used as the success value for access, according to the man pages.  It should also return a bit/bool, not int.
>
> Regards,
> James Dunne

fwiw, the unittests on Linux fail in std.math (line 247), std.file (on the issue you mention) and std.boxer (I can't remember which line).