Skip to content

Commit

Permalink
Mode is a required arg to mkdir in Node 0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Mar 9, 2012
1 parent cf57346 commit aba424f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/utils/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ var fileUtils = new (function () {
_copyFile(from, to, opts);
};

this.mkdirP = function (dir) {
this.mkdirP = function (dir, mode) {
var dirPath = path.normalize(dir)
, paths = dirPath.split(/\/|\\/)
, currPath
Expand All @@ -162,7 +162,7 @@ var fileUtils = new (function () {
currPath = path.join(currPath, next);
try {
//console.log('making ' + currPath);
fs.mkdirSync(currPath);
fs.mkdirSync(currPath, mode || 0755);
}
catch(e) {
if (e.code != 'EEXIST') {
Expand Down

0 comments on commit aba424f

Please sign in to comment.