Skip to content

Commit

Permalink
Stop using process.umask()
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyfarrell committed Apr 22, 2020
1 parent 8e1075d commit 52aba53
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mkdirp.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function mkdirp(dirpath, customMode, callback) {
customMode = undefined;
}

var mode = customMode || (DEFAULT_DIR_MODE & ~process.umask());
var mode = customMode || DEFAULT_DIR_MODE;
dirpath = path.resolve(dirpath);

fs.mkdir(dirpath, mode, onMkdir);
Expand Down Expand Up @@ -46,12 +46,12 @@ function mkdirp(dirpath, customMode, callback) {
return callback(mkdirErr);
}

// TODO: Is it proper to mask like this?
if ((stats.mode & MASK_MODE) === mode) {
if (!customMode) {
return callback();
}

if (!customMode) {
// TODO: Is it proper to mask like this?
if ((stats.mode & MASK_MODE) === mode) {
return callback();
}

Expand Down

0 comments on commit 52aba53

Please sign in to comment.