Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fs: make mkdir() default to 0777 permissions

Fixes #1999.
  • Loading branch information...
commit 11d68eb3fc3c2f8d377cf8c50f1babb8d1f82d5f 1 parent 52eaac4
@bnoordhuis bnoordhuis authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/fs.js
View
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) {
Please sign in to comment.
Something went wrong with that request. Please try again.