mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Fix JS mkPath.
This commit is contained in:
@@ -38,8 +38,8 @@ var mapOr = function(func, array, done) {
|
|||||||
// Make a directory and sub-directories.
|
// Make a directory and sub-directories.
|
||||||
var mkPath = function(dirPath, mode, done) {
|
var mkPath = function(dirPath, mode, done) {
|
||||||
fs.mkdir(dirPath, typeof mode === "string" ? parseInt(mode, 8) : mode, function (e) {
|
fs.mkdir(dirPath, typeof mode === "string" ? parseInt(mode, 8) : mode, function (e) {
|
||||||
if (e && e.code === "EEXIST") {
|
if (!e || e.code === "EEXIST") {
|
||||||
// Already exists, done.
|
// Created or already exists, done.
|
||||||
done();
|
done();
|
||||||
}
|
}
|
||||||
else if (e.code === "ENOENT") {
|
else if (e.code === "ENOENT") {
|
||||||
|
|||||||
Reference in New Issue
Block a user