whitespace and block cleanup

This commit is contained in:
AJ ONeal 2012-01-15 20:47:08 -07:00
parent 5ea101960e
commit 042cc6d3d6
2 changed files with 27 additions and 22 deletions

View File

@ -10,5 +10,5 @@
},
"lib" : ".",
"main" : "./walk.js",
"version" : "2.1.0"
"version" : "2.1.1"
}

View File

@ -22,16 +22,17 @@
;
function readdirHandler(err, files) {
var fnodeGroups = TypeEmitter.createNodeGroups();
var fnodeGroups = TypeEmitter.createNodeGroups()
;
function filesHandler(cont, file) {
var statPath;
emitter.emit('name', curpath, file, noop);
var statPath
;
function lstatHandler(err, stat) {
stat = stat || {};
stat.name = file;
if (err) {
stat.error = err;
//emitter.emit('error', curpath, stat);
@ -44,7 +45,10 @@
}
}
emitter.emit('name', curpath, file, noop);
statPath = curpath + '/' + file;
if (sync) {
try {
lstatHandler(null, fs.lstatSync(statPath));
@ -90,7 +94,11 @@
}
}
if (err) {
if (!err) {
readFiles();
return;
}
if (!firstRun) {
emitter.emit('directoryError', curpath, { error: err }, noop);
readFiles();
@ -99,17 +107,14 @@
firstRun = false;
fs.lstat(curpath, function (e, stat) {
if (stat) {
files = [curpath.replace(/.*\//, '')];
curpath = curpath.replace(files[0], '');
}
readFiles();
})
//emitter.emit('error', curpath, { error: err });
return;
}
readFiles();
});
}
function walkSync() {