update the bundled node-mkdirp to v0.3.4

This commit is contained in:
Nathan Rajlich 2012-08-21 19:03:17 -07:00
parent fcf705d9e0
commit 6bea3b32a6
6 changed files with 14 additions and 67 deletions

28
node_modules/mkdirp/index.js generated vendored
View file

@ -27,18 +27,10 @@ function mkdirP (p, mode, f, made) {
});
break;
case 'EISDIR':
case 'EPERM':
// Operation not permitted or already is a dir.
// This is the error you get when trying to mkdir('c:/')
// on windows, or mkdir('/') on unix. Make sure it's a
// dir by falling through to the EEXIST case.
case 'EROFS':
// a read-only file system.
// However, the dir could already exist, in which case
// the EROFS error will be obscuring a EEXIST!
// Fallthrough to that case.
case 'EEXIST':
// In the case of any other error, just see if there's a dir
// there already. If so, then hooray! If not, then something
// is borked.
default:
fs.stat(p, function (er2, stat) {
// if the stat fails, then that's super weird.
// let the original error be the failure reason.
@ -46,10 +38,6 @@ function mkdirP (p, mode, f, made) {
else cb(null, made);
});
break;
default:
cb(er, made);
break;
}
});
}
@ -74,7 +62,10 @@ mkdirP.sync = function sync (p, mode, made) {
sync(p, mode, made);
break;
case 'EEXIST' :
// In the case of any other error, just see if there's a dir
// there already. If so, then hooray! If not, then something
// is borked.
default:
var stat;
try {
stat = fs.statSync(p);
@ -84,9 +75,6 @@ mkdirP.sync = function sync (p, mode, made) {
}
if (!stat.isDirectory()) throw err0;
break;
default :
throw err0
break;
}
}