Make UT mkPath take strings as mode.

This commit is contained in:
Arthur Britto
2012-09-17 12:34:35 -07:00
parent 8b1ec78747
commit d0d8fb4195
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@ var makeBase = function(name, done) {
console.log("start> %s: %s", name, path);
// Reset the server directory, build it if needed.
utils.resetPath(path, parseInt('0777', 8), function (e) {
utils.resetPath(path, '0777', function (e) {
if (e) {
throw e;
}

View File

@@ -37,7 +37,7 @@ var mapOr = function(func, array, done) {
// Make a directory and sub-directories.
var mkPath = function(dirPath, mode, done) {
fs.mkdir(dirPath, mode, function (e) {
fs.mkdir(dirPath, typeof mode === "string" ? parseInt(mode, 8) : mode, function (e) {
if (e && e.code === "EEXIST") {
// Already exists, done.
done();