joyent/node — pull request #2601 by AvianFlu (2012-01-23 22:00:38+00:00)
Title: Use more specific existence check in path.exists

Currently, `path.exists` in `v0.6` and `fs.exists` on `master` only check whether or not an error occurs when trying to stat a given path - this leads to erroneous results in cases where attempting to stat the given path would produce `EACCES` or `ELOOP`, among other common errors.

These functions should instead check specifically for `ENOENT`. This provides a fix, as well as more test coverage.

I'll make the same change to `master` in a separate pull, pending discussion of this.