diff --git a/lib/customUtils.js b/lib/customUtils.js index 4283f0a..714d470 100644 --- a/lib/customUtils.js +++ b/lib/customUtils.js @@ -1,7 +1,7 @@ var fs = require('fs') , crypto = require('crypto') , path = require('path') - , childProcess = require('child_process') + , mkdirp = require('mkdirp') ; @@ -13,7 +13,7 @@ function ensureDirectoryExists (dir, cb) { var callback = cb || function () {} ; - childProcess.exec('mkdir -p ' + dir.replace(/ /g, '\\ '), function (err) { return callback(err); }); + mkdirp(dir, function (err) { return callback(err); }); } diff --git a/package.json b/package.json index b826b5f..fe49054 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nedb", - "version": "0.7.4", + "version": "0.7.5", "author": { "name": "tldr.io", "email": "hello@tldr.io" @@ -22,7 +22,8 @@ "dependencies": { "async": "~0.2.8", "underscore": "~1.4.4", - "binary-search-tree": "0.2.3" + "binary-search-tree": "0.2.3", + "mkdirp": "~0.3.5" }, "devDependencies": { "chai": "1.0.x",