From a661830569f424ac929a075bacaa94d70e732924 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 2 Feb 2012 16:56:58 +0100 Subject: [PATCH] Run path.exists paths through _makeLong --- lib/path.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/path.js b/lib/path.js index c10ff7efce..6d410c70e5 100644 --- a/lib/path.js +++ b/lib/path.js @@ -402,7 +402,7 @@ exports.extname = function(path) { exports.exists = function(path, callback) { - process.binding('fs').stat(path, function(err, stats) { + process.binding('fs').stat(_makeLong(path), function(err, stats) { if (callback) callback(err ? false : true); }); }; @@ -410,7 +410,7 @@ exports.exists = function(path, callback) { exports.existsSync = function(path) { try { - process.binding('fs').stat(path); + process.binding('fs').stat(_makeLong(path)); return true; } catch (e) { return false; @@ -418,7 +418,7 @@ exports.existsSync = function(path) { }; -exports._makeLong = isWindows ? +var _makeLong = exports._makeLong = isWindows ? function(path) { var resolvedPath = exports.resolve(path);