From edc248289bd3cd8aabd05ef5ea4f6242cc7ec5e2 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 3 Feb 2011 15:03:44 -0700 Subject: [PATCH] fixed sole bug in Jorge's example --- lib/{walk-alternate-implementation.js => walk-jorge.js} | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) rename lib/{walk-alternate-implementation.js => walk-jorge.js} (93%) 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);