Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
fs: make mkdir() default to 0777 permissions
Browse files Browse the repository at this point in the history
Fixes #1999.
  • Loading branch information
bnoordhuis committed Nov 3, 2011
1 parent 52eaac4 commit 11d68eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/fs.js
Expand Up @@ -354,11 +354,11 @@ fs.fsyncSync = function(fd) {
};

fs.mkdir = function(path, mode, callback) {
binding.mkdir(path, modeNum(mode), callback || noop);
binding.mkdir(path, modeNum(mode, 511 /*=0777*/), callback || noop);
};

fs.mkdirSync = function(path, mode) {
return binding.mkdir(path, modeNum(mode));
return binding.mkdir(path, modeNum(mode, 511 /*=0777*/));
};

fs.sendfile = function(outFd, inFd, inOffset, length, callback) {
Expand Down

0 comments on commit 11d68eb

Please sign in to comment.