changed excludeHidden to excludeHiddenUnix b/c the testing for hidden file is only applicable for unix

This commit is contained in:
refaelos 2012-10-15 15:35:43 +02:00
parent 8097eb52bd
commit 658589c35e
2 changed files with 3 additions and 3 deletions

View file

@ -183,7 +183,7 @@ 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 (opts.excludeHidden && /^\./.test(files[i])) continue; if (opts.excludeHiddenUnix && /^\./.test(files[i])) continue;
var currFile = fs.lstatSync(sourceDir + "/" + files[i]); var currFile = fs.lstatSync(sourceDir + "/" + files[i]);

View file

@ -40,7 +40,7 @@ module.exports = testCase({
test.ok(path.existsSync(dir), 'Folders should exist'); test.ok(path.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir, 0777); wrench.mkdirSyncRecursive(testdir, 0777);
wrench.copyDirSyncRecursive(dir, testdir, { excludeHidden: false }); wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: false });
var files = wrench.readdirSyncRecursive(testdir); var files = wrench.readdirSyncRecursive(testdir);
@ -57,7 +57,7 @@ module.exports = testCase({
test.ok(path.existsSync(dir), 'Folders should exist'); test.ok(path.existsSync(dir), 'Folders should exist');
wrench.mkdirSyncRecursive(testdir, 0777); wrench.mkdirSyncRecursive(testdir, 0777);
wrench.copyDirSyncRecursive(dir, testdir, { excludeHidden: true }); wrench.copyDirSyncRecursive(dir, testdir, { excludeHiddenUnix: true });
var files = wrench.readdirSyncRecursive(testdir); var files = wrench.readdirSyncRecursive(testdir);