Update lib/wrench.js

Code crashes on this line if opts is undefined. I'm guessing that 
the default behavior should be that symlinked files gets copied as
new files unless the option inflateSymlinks is set to false.
This commit is contained in:
Victor Jonsson 2012-11-19 15:49:07 +01:00
parent 75af1f122b
commit 061c2e0387

View file

@ -205,7 +205,7 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
} else if(currFile.isSymbolicLink()) {
var symlinkFull = fs.readlinkSync(sourceDir + "/" + files[i]);
if (!opts.inflateSymlinks) {
if (opts !== undefined && opts.inflateSymlinks === false) {
fs.symlinkSync(symlinkFull, newDirLocation + "/" + files[i]);
continue;
}