paulmillr / readdirp

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

Warn instead of error for recursive detection #168

Closed ath0mas closed 3 years ago

ath0mas commented 3 years ago

As I am willing to update/fork rm-modules for the possible Out of memory I am facing too (https://github.com/hughsk/rm-modules/issues/5), updating readdirp with version 3.5 and its "infinite loop" fix seems perfect,

3.5 (Oct 13, 2020) disallows recursive directory-based symlinks. Before, it could have entered infinite loop.

but Should it be possible to not destroy and exit on error in this case? like adding recursive to NORMAL_FLOW_ERRORS

In rm-modules case, the expected behavior would be to continue and process all but the problematic entry.

paulmillr commented 3 years ago

perhaps. pull request for the change would be reviewed