From d0d8fb419509fc6c78b7512565e58b1cd5f3acfc Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Mon, 17 Sep 2012 12:34:35 -0700 Subject: [PATCH] Make UT mkPath take strings as mode. --- test/server.js | 2 +- test/utils.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/server.js b/test/server.js index 11313b553b..36389818b6 100644 --- a/test/server.js +++ b/test/server.js @@ -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; } diff --git a/test/utils.js b/test/utils.js index c840431213..1f706e7a72 100644 --- a/test/utils.js +++ b/test/utils.js @@ -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();