From c2674863e9547df5f874d4a43c2b1f920b9c31eb Mon Sep 17 00:00:00 2001 From: refaelos Date: Mon, 15 Oct 2012 14:59:06 +0200 Subject: [PATCH] added excludeHidden flag --- lib/wrench.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wrench.js b/lib/wrench.js index 38eec08..18fa706 100644 --- a/lib/wrench.js +++ b/lib/wrench.js @@ -183,7 +183,7 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) { var files = fs.readdirSync(sourceDir); for(var i = 0; i < files.length; i++) { - if (/^\./.test(files[i])) continue; + if (opts.excludeHidden && /^\./.test(files[i])) continue; var currFile = fs.lstatSync(sourceDir + "/" + files[i]);