util: fix mkdirp error on windows.

This commit is contained in:
Christopher Jeffrey 2016-12-30 00:12:00 -08:00
parent b5ff10e74f
commit 933d80bb37
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD

View File

@ -1005,9 +1005,11 @@ util.mkdirp = function mkdirp(path) {
path = parts.shift() + '/';
}
if (parts[0].length === 0) {
parts.shift();
path = '/';
if (parts.length > 0) {
if (parts[0].length === 0) {
parts.shift();
path = '/';
}
}
for (i = 0; i < parts.length; i++) {