From 658589c35e9d10ffb6b6096e222820519a6541b0 Mon Sep 17 00:00:00 2001 From: refaelos Date: Mon, 15 Oct 2012 15:35:43 +0200 Subject: [PATCH] changed excludeHidden to excludeHiddenUnix b/c the testing for hidden file is only applicable for unix --- lib/wrench.js | 2 +- tests/copydirsync_unix.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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);