Merge pull request #16 from rwmtse/patch-1
Make sure fix for issue #7 works in Windows too (check for backslash in ...
This commit is contained in:
commit
1b0bc91152
1 changed files with 4 additions and 0 deletions
|
|
@ -267,6 +267,10 @@ var mkdirSyncRecursive = function(path, mode) {
|
|||
} catch(err) {
|
||||
if(err.code == "ENOENT") {
|
||||
var slashIdx = path.lastIndexOf("/");
|
||||
if(slashIdx < 0) {
|
||||
slashIdx = path.lastIndexOf("\\");
|
||||
}
|
||||
|
||||
if(slashIdx > 0) {
|
||||
var parentPath = path.substring(0, slashIdx);
|
||||
mkdirSyncRecursive(parentPath, mode);
|
||||
|
|
|
|||
Reference in a new issue