Merge in @refaelos excludeHidden && excludeHiddenUnix patch
This commit is contained in:
commit
6c90fc6e67
9 changed files with 75 additions and 2 deletions
|
|
@ -187,9 +187,9 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
|
|||
if(!opts.whitelist && opts.filter && files[i].match(opts.filter)) continue;
|
||||
// if opts.whitelist is true every file or directory which doesn't match opts.filter will be ignored
|
||||
if(opts.whitelist && opts.filter && !files[i].match(opts.filter)) continue;
|
||||
if (opts.excludeHiddenUnix && /^\./.test(files[i])) continue;
|
||||
|
||||
var currFile = fs.lstatSync(sourceDir + "/" + files[i]);
|
||||
|
||||
if(currFile.isDirectory()) {
|
||||
/* recursion this thing right on back. */
|
||||
exports.copyDirSyncRecursive(sourceDir + "/" + files[i], newDirLocation + "/" + files[i], opts);
|
||||
|
|
|
|||
Reference in a new issue