not copying hidden files/folders
This commit is contained in:
parent
d1ffccba60
commit
a2cac1647d
1 changed files with 2 additions and 0 deletions
|
|
@ -183,6 +183,8 @@ exports.copyDirSyncRecursive = function(sourceDir, newDirLocation, opts) {
|
||||||
var files = fs.readdirSync(sourceDir);
|
var files = fs.readdirSync(sourceDir);
|
||||||
|
|
||||||
for(var i = 0; i < files.length; i++) {
|
for(var i = 0; i < files.length; i++) {
|
||||||
|
if (/^\./.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