summaryrefslogtreecommitdiff
path: root/lib/path.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/path.js')
-rw-r--r--lib/path.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/path.js b/lib/path.js
index 6d410c70e5..87451e9375 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]\:\\/)) {