Skip to content

Commit

Permalink
get rid of chmods
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jan 20, 2012
1 parent 0384932 commit ba450d6
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions index.js
Expand Up @@ -28,7 +28,6 @@ function mkdirP (p, mode, f) {
// if the stat fails, then that's super weird.
// let the original EEXIST be the failure reason.
if (er2 || !stat.isDirectory()) cb(er)
else if ((stat.mode & 0777) !== mode) fs.chmod(p, mode, cb);
else cb();
});
break;
Expand Down Expand Up @@ -68,16 +67,6 @@ mkdirP.sync = function sync (p, mode) {
throw err0
}
if (!stat.isDirectory()) throw err0;
else if ((stat.mode & 0777) !== mode) {
try {
fs.chmodSync(p, mode);
}
catch (err) {
if (err && err.code === 'EPERM') return null;
else throw err;
}
return null;
}
else return null;
break;
default :
Expand Down

0 comments on commit ba450d6

Please sign in to comment.