Fixes #39
This commit is contained in:
parent
a4ea1864ef
commit
2628e88075
1 changed files with 7 additions and 5 deletions
|
|
@ -184,10 +184,12 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
|
||||||
|
|
||||||
for(var i = 0; i < files.length; i++) {
|
for(var i = 0; i < files.length; i++) {
|
||||||
// ignores all files or directories which match the RegExp in opts.filter
|
// ignores all files or directories which match the RegExp in opts.filter
|
||||||
if(!opts.whitelist && opts.filter && files[i].match(opts.filter)) continue;
|
if(typeof opts !== 'undefined') {
|
||||||
// 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.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.excludeHiddenUnix && /^\./.test(files[i])) continue;
|
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]);
|
var currFile = fs.lstatSync(sourceDir + "/" + files[i]);
|
||||||
if(currFile.isDirectory()) {
|
if(currFile.isDirectory()) {
|
||||||
|
|
|
||||||
Reference in a new issue