From 061c2e0387958853cdc570bf2b0a8e239a18d661 Mon Sep 17 00:00:00 2001 From: Victor Jonsson Date: Mon, 19 Nov 2012 15:49:07 +0100 Subject: [PATCH] Update lib/wrench.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- lib/wrench.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wrench.js b/lib/wrench.js index b45b5d3..26374b3 100644 --- a/lib/wrench.js +++ b/lib/wrench.js @@ -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; }