Browse Source

fs: make mkdir() default to 0777 permissions

Fixes #1999.
v0.7.4-release
Ben Noordhuis 13 years ago
parent
commit
11d68eb3fc
  1. 4
      lib/fs.js

4
lib/fs.js

@ -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) {

Loading…
Cancel
Save