fixed sole bug in Jorge's example

This commit is contained in:
AJ ONeal 2011-02-03 15:03:44 -07:00
parent 2afcadfeb4
commit edc248289b
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ function walk (file, cb) {
function getDirectory (cb) { function getDirectory (cb) {
fs.readdir(file, function(err, files) { 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); //if (err) throw Error(err);
files.sort(sort); files.sort(sort);
files.forEach(fullPath); files.forEach(fullPath);