Skip to content

Commit

Permalink
Remove unnecessary umask calls
Browse files Browse the repository at this point in the history
Legacy fix for #22
Re nodejs/node#32321
  • Loading branch information
isaacs committed Apr 3, 2020
1 parent 42a012c commit bea6382
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 32 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function mkdirP (p, opts, f, made) {
var xfs = opts.fs || fs;

if (mode === undefined) {
mode = _0777 & (~process.umask());
mode = _0777
}
if (!made) made = null;

Expand Down Expand Up @@ -62,7 +62,7 @@ mkdirP.sync = function sync (p, opts, made) {
var xfs = opts.fs || fs;

if (mode === undefined) {
mode = _0777 & (~process.umask());
mode = _0777
}
if (!made) made = null;

Expand Down
4 changes: 2 additions & 2 deletions readme.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Create a new directory and any necessary subdirectories at `dir` with octal
permission string `opts.mode`. If `opts` is a non-object, it will be treated as
the `opts.mode`.

If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
If `opts.mode` isn't specified, it defaults to `0777`.

`cb(err, made)` fires with the error or the first directory `made`
that had to be created, if any.
Expand All @@ -52,7 +52,7 @@ Synchronously create a new directory and any necessary subdirectories at `dir`
with octal permission string `opts.mode`. If `opts` is a non-object, it will be
treated as the `opts.mode`.

If `opts.mode` isn't specified, it defaults to `0777 & (~process.umask())`.
If `opts.mode` isn't specified, it defaults to `0777`.

Returns the first directory that had to be created, if any.

Expand Down
28 changes: 0 additions & 28 deletions test/umask.js

This file was deleted.

0 comments on commit bea6382

Please sign in to comment.