diff --git a/lib/package.json b/lib/package.json index a9412af..7c18361 100644 --- a/lib/package.json +++ b/lib/package.json @@ -6,7 +6,7 @@ "author" : "AJ ONeal ", "contributors" : [], "dependencies" : { - "forEachAsync": ">= 2.1.0" + "forEachAsync": "~2.2" }, "lib" : ".", "main" : "./walk.js", diff --git a/lib/walk.js b/lib/walk.js index cf4d8e1..5209198 100644 --- a/lib/walk.js +++ b/lib/walk.js @@ -31,11 +31,11 @@ var me = this ; - me._wsync = true; + me._wsync = sync; me._wq = []; me._wqueue = [me._wq]; me._wcurpath = undefined; - me._wfistrun = true; + me._wfirstrun = true; me._wcurpath = pathname; if (me._wsync) { @@ -151,13 +151,13 @@ return; } - if (!me._wfistrun) { + if (!me._wfirstrun) { me.emit('directoryError', me._wcurpath, { error: err }, noop); me._wReadFiles(); return; } - me._wfistrun = false; + me._wfirstrun = false; // TODO how to remove this anony? fs.lstat(me._wcurpath, function (e, stat) {