Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Making work on Windows by using `path.resolve`.
- Loading branch information
Showing
with
1 addition
and
3 deletions.
-
+1
−3
lib/codex/utils/fs.js
|
@@ -23,11 +23,9 @@ exports.mkdir = function (_path, mode, callback) { |
|
|
_path = path.resolve(_path); |
|
|
|
|
|
function _mkdir(p, next) { |
|
|
var _p = path.normalize(p).split('/'); |
|
|
|
|
|
path.exists(p, function (exists) { |
|
|
if (!exists) { |
|
|
_mkdir(_p.slice(0, -1).join('/'), function (err) { |
|
|
_mkdir(path.resolve(p, '..'), function (err) { |
|
|
if (err) next(err); |
|
|
fs.mkdir(p, mode, function () { |
|
|
next(null); |
|
|