diff --git a/lib/wrench.js b/lib/wrench.js index 18fa706..13514d0 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 (opts.excludeHidden && /^\./.test(files[i])) continue; + if (opts.excludeHiddenUnix && /^\./.test(files[i])) continue; var currFile = fs.lstatSync(sourceDir + "/" + files[i]); diff --git a/tests/copydirsync_unix.js b/tests/copydirsync_unix.js index d8e85db..59949a8 100644 --- a/tests/copydirsync_unix.js +++ b/tests/copydirsync_unix.js @@ -40,7 +40,7 @@ module.exports = testCase({ test.ok(path.existsSync(dir), 'Folders should exist'); wrench.mkdirSyncRecursive(testdir, 0777); - wrench.copyDirSyncRecursive(dir, testdir, { excludeHidden: false }); + wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false }); var files = wrench.readdirSyncRecursive(testdir); @@ -57,7 +57,7 @@ module.exports = testCase({ test.ok(path.existsSync(dir), 'Folders should exist'); wrench.mkdirSyncRecursive(testdir, 0777); - wrench.copyDirSyncRecursive(dir, testdir, { excludeHidden: true }); + wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: true }); var files = wrench.readdirSyncRecursive(testdir);