digitalmars.D - std.file.exists is wrong for linux
- James Dunne (9/9) Aug 27 2005 int exists(char[] name)
- Ben Hinkle (4/13) Aug 27 2005 fwiw, the unittests on Linux fail in std.math (line 247), std.file (on t...
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
Aug 27 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).
Aug 27 2005








"Ben Hinkle" <ben.hinkle gmail.com>