fs: fix fs.realpath on windows to return on error
authorBenjamin Pasero <benjamin.pasero@gmail.com>
Tue, 8 Nov 2011 10:17:33 +0000 (11:17 +0100)
committerBen Noordhuis <info@bnoordhuis.nl>
Tue, 8 Nov 2011 12:02:04 +0000 (13:02 +0100)
lib/fs.js

index f4b3fd3..b69a240 100644 (file)
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -775,7 +775,7 @@ if (isWindows) {
       return cb(null, cache[p]);
     }
     fs.stat(p, function(err) {
-      if (err) cb(err);
+      if (err) return cb(err);
       if (cache) cache[p] = p;
       cb(null, p);
     });