From b1bb17fd2b432144045799950f49a6b52c6c53c0 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Tue, 8 Nov 2011 11:17:33 +0100 Subject: [PATCH] fs: fix fs.realpath on windows to return on error --- lib/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fs.js b/lib/fs.js index f4b3fd33de7..b69a240ea3b 100644 --- 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); });