diff --git a/lib/walk-alternate-implementation.js b/lib/walk-jorge.js similarity index 93% rename from lib/walk-alternate-implementation.js rename to lib/walk-jorge.js index ab0fd83..6146f1d 100644 --- a/lib/walk-alternate-implementation.js +++ b/lib/walk-jorge.js @@ -30,7 +30,8 @@ function walk (file, cb) { function getDirectory (cb) { fs.readdir(file, function(err, files) { - if (!files) return; + // XXX bug was here. `next()` added by coolaj86 + if (!files) return next(); //if (err) throw Error(err); files.sort(sort); files.forEach(fullPath);