Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

actually fix #11 and #16

  • Loading branch information...
commit 0f1a2f7ce901de6e43c84061f3e07921d9b36020 1 parent ef5d33e
@hughsk hughsk authored
Showing with 7 additions and 3 deletions.
  1. +7 −3 lib/walk.js
View
10 lib/walk.js
@@ -18,7 +18,11 @@ module.exports = (function() {
return;
}
- if (!relnames.length) return callbacks.finished(null)
+ if (!relnames.length) {
+ counter -= 1;
+ if (!counter) callbacks.finished(null);
+ return;
+ }
relnames.forEach(function(relname, index, relnames) {
var name = path.join(dirname, relname);
@@ -30,8 +34,8 @@ module.exports = (function() {
return;
}
- if(stat.isDirectory() && name !== '.svn' && name !== '.git') {
- walk(name, options, callbacks);
+ if(stat.isDirectory()) {
+ if (name !== '.svn' && name !== '.git') walk(name, options, callbacks);
} else {
if (!options.mask || name.match(options.mask)) {
callbacks.file(name);
Please sign in to comment.
Something went wrong with that request. Please try again.