diff --git a/lib/walk.js b/lib/walk.js index e06d77c..ed950b2 100644 --- a/lib/walk.js +++ b/lib/walk.js @@ -205,7 +205,7 @@ var err , files , me = this - ; + ;f try { files = fs.readdirSync(me._wcurpath); @@ -237,7 +237,7 @@ while (me._wq.length && me._wFilter()) { me._wcurpath = me._wq.pop(); } - if (me._wcurpath) { + if (me._wcurpath && !me._wFilter()) { me._wWalk(); } else { me._wNext();