Skip to content
This repository has been archived by the owner on Jun 19, 2019. It is now read-only.

Commit

Permalink
Merge pull request #81 from coreybutler/patch-1
Browse files Browse the repository at this point in the history
Set isDir to false for non-existant directory
  • Loading branch information
Ryan McGrath committed Mar 1, 2014
2 parents c2dce2f + de1d50d commit 89d5e60
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/wrench.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 89d5e60

Please sign in to comment.