Set isDir to false for non-existant directory #81
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ exports.readdirSyncRecursive = function(baseDir) {
|
|||
curFiles,
|
||||
nextDirs,
|
||||
isDir = function(fname){
|
||||
return fs.statSync( _path.join(baseDir, fname) ).isDirectory();
|
||||
return fs.existsSync(_path.join(baseDir, fname)) ? fs.statSync( _path.join(baseDir, fname) ).isDirectory() : false;
|
||||
},
|
||||
prependBaseDir = function(fname){
|
||||
return _path.join(baseDir, fname);
|
||||
|
|
|
|||
Reference in a new issue