fs: make mkdir() default to 0777 permissions

Fixes #1999.
pull/5370/head
Ben Noordhuis 2011-11-03 09:35:49 +01:00
parent 52eaac4382
commit 11d68eb3fc
1 changed files with 2 additions and 2 deletions

View File

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