Remove redundant check

We default opts to {} at the top of the function.

Also fix indentation.
This commit is contained in:
Jo Liss 2014-04-03 23:22:20 +00:00
parent 13f486d867
commit 8fef99a450

View file

@ -256,15 +256,9 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
for(var i = 0; i < files.length; i++) {
// ignores all files or directories which match the RegExp in opts.filter
if(typeof opts !== 'undefined') {
if (hasFilter) {
if (!isFileIncluded(opts, sourceDir, files[i])) {
continue;
}
}
if (hasFilter && !isFileIncluded(opts, sourceDir, files[i])) continue;
if (opts.excludeHiddenUnix && /^\./.test(files[i])) continue;
}
var currFile = fs.lstatSync(_path.join(sourceDir, files[i]));