From e5ea6ad0f01e67db73a30190b520df25ba8e16f4 Mon Sep 17 00:00:00 2001 From: Bert Belder Date: Thu, 2 Feb 2012 16:57:45 +0100 Subject: [PATCH] _makeLong shouldn't turn the empty string into \\?\C:\ --- lib/path.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/path.js b/lib/path.js index 6d410c70e51..87451e93754 100644 --- a/lib/path.js +++ b/lib/path.js @@ -420,6 +420,11 @@ exports.existsSync = function(path) { var _makeLong = exports._makeLong = isWindows ? function(path) { + path = "" + path; + if (!path) { + return ""; + } + var resolvedPath = exports.resolve(path); if (resolvedPath.match(/^[a-zA-Z]\:\\/)) {