Skip to content

Commit ba450d6

Browse files
author
James Halliday
committed
get rid of chmods
1 parent 0384932 commit ba450d6

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

index.js

-11
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ function mkdirP (p, mode, f) {
2828
// if the stat fails, then that's super weird.
2929
// let the original EEXIST be the failure reason.
3030
if (er2 || !stat.isDirectory()) cb(er)
31-
else if ((stat.mode & 0777) !== mode) fs.chmod(p, mode, cb);
3231
else cb();
3332
});
3433
break;
@@ -68,16 +67,6 @@ mkdirP.sync = function sync (p, mode) {
6867
throw err0
6968
}
7069
if (!stat.isDirectory()) throw err0;
71-
else if ((stat.mode & 0777) !== mode) {
72-
try {
73-
fs.chmodSync(p, mode);
74-
}
75-
catch (err) {
76-
if (err && err.code === 'EPERM') return null;
77-
else throw err;
78-
}
79-
return null;
80-
}
8170
else return null;
8271
break;
8372
default :

0 commit comments

Comments
 (0)