Skip to content

Commit 2867920

Browse files
jonchurchisaacs
authored andcommitted
fix infinite loop on windows machines
PR-URL: #15 Credit: @jonchurch Close: #15 Reviewed-by: @isaacs
1 parent d784e70 commit 2867920

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

index.js

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ function mkdirP (p, opts, f, made) {
3131
}
3232
switch (er.code) {
3333
case 'ENOENT':
34+
if (path.dirname(p) === p) return cb(er);
3435
mkdirP(path.dirname(p), opts, function (er, made) {
3536
if (er) cb(er, made);
3637
else mkdirP(p, opts, cb, made);

0 commit comments

Comments
 (0)