Make sure fix for issue #7 works in Windows too (check for backslash in ... #16

Merged
rwmtse merged 1 commit from patch-1 into master 2012-02-18 01:49:16 -08:00
Showing only changes of commit e5a368d67a - Show all commits

View file

@ -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);