joyent/node — Issue #1927: Strange fs.stat error results (Windows 0.5.10)
Author: geoffreak
Created: 2011-10-24 04:35:55+00:00
State: open

The following code produces vary different results on both Windows (0.5.10) and Mac (0.4.12) when run on an non-existent directory:

```javascript
util = require('util');
require('fs').stat('/directory/does/not/exist', function(err, stat){
console.log(util.inspect(err));
console.log(util.inspect(stat));
});
```

Mac (0.4.12) - expected results

```javascript
{ stack: [Getter/Setter],
arguments: undefined,
type: undefined,
message: 'ENOENT, No such file or directory \'/directory/does/not/exist\'',
errno: 2,
code: 'ENOENT',
path: '/directory/does/not/exist' }
undefined
```

Windows (0.5.10) - unexpected results

```javascript
{ [ Error: ENOENT, The operation completed successfully.
'/directory/does/not/exist'] errno: 32, code: 'ENOENT', path: '/directory/does/not/exist' }
undefined
```

I don't currently have 0.5.10 installed on my Mac to confirm the results there.

Surely the 0.5.10 results are a bug?