diff --git a/lib/walk.js b/lib/walk.js index f4a9b6c..93c40ed 100644 --- a/lib/walk.js +++ b/lib/walk.js @@ -186,7 +186,7 @@ // error? first run? => maybe a file, maybe a true error me._wfirstrun = false; - // readdir failed (might be a file), try a stat on the parent + // readdir failed (might be a file), try a stat on the parent parent = me._wcurpath.replace(/^(.*)\/.*$/, '$1'); fs[me._wStat](parent, function (e, stat) { @@ -194,7 +194,7 @@ // success // now try stat on this as a child of the parent directory child = me._wcurpath.replace(/^.*\/(.*)$/, '$1'); - files = [child]; + me._wcurfiles = [child]; me._wcurpath = parent; } else { // TODO v3.0