fs: make mkdir() default to 0777 permissions

Fixes #1999.
This commit is contained in:
Ben Noordhuis 2011-11-03 09:35:49 +01:00
parent 52eaac4382
commit 11d68eb3fc

View File

@ -354,11 +354,11 @@ fs.fsyncSync = function(fd) {
}; };
fs.mkdir = function(path, mode, callback) { 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) { 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) { fs.sendfile = function(outFd, inFd, inOffset, length, callback) {