paulmillr / readdirp

Recursive version of fs.readdir with streaming api.
https://paulmillr.com
MIT License
382 stars 53 forks source link

warn event fires after end for stream interface #78

Closed rolanday closed 5 years ago

rolanday commented 5 years ago

Related to #75, warn fires after end on latest head version 3.0.0..

rolanday commented 5 years ago

Should also add, to repro scan an otherwise empty root except for single subdirectory that has its read perms removed, like so

- root. <== readirp this
     |- subdir <== chmod -r this

This will prevent issue from slipping by because there were other files remaining to be found after the warn'ed dir (or file), giving chance for warn to fire in time before close event.

paulmillr commented 5 years ago

try it.

rolanday commented 5 years ago

Fix works. Thank you!!