mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-19 18:45:52 +00:00
Make UT mkPath take strings as mode.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user