Skip to content

Commit bea6382

Browse files
committed
Remove unnecessary umask calls
Legacy fix for #22 Re nodejs/node#32321
1 parent 42a012c commit bea6382

File tree

3 files changed

+4
-32
lines changed

3 files changed

+4
-32
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function mkdirP (p, opts, f, made) {
1717
var xfs = opts.fs || fs;
1818

1919
if (mode === undefined) {
20-
mode = _0777 & (~process.umask());
20+
mode = _0777
2121
}
2222
if (!made) made = null;
2323

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

6464
if (mode === undefined) {
65-
mode = _0777 & (~process.umask());
65+
mode = _0777
6666
}
6767
if (!made) made = null;
6868

readme.markdown

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Create a new directory and any necessary subdirectories at `dir` with octal
3737
permission string `opts.mode`. If `opts` is a non-object, it will be treated as
3838
the `opts.mode`.
3939

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

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

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

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

test/umask.js

-28
This file was deleted.

0 commit comments

Comments
 (0)