fs: fix recursive watch error handling · nodejs/node@ba5ca5a · GitHub
Skip to content

Commit ba5ca5a

Browse files
panvaaduh95
authored andcommitted
fs: fix recursive watch error handling
Recursive watch inverted the throwIfNoEntry check during setup, causing the default behavior to suppress ENOENT while the opt-out threw it. Other setup errors were also silently ignored. Suppress only ENOENT when throwIfNoEntry is false. Propagate all other setup failures and close watchers created before a partial failure. Signed-off-by: Filip Skokan <panva.ip@gmail.com> Assisted-by: Codex PR-URL: #65635 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 33b8d6e commit ba5ca5a

2 files changed

Lines changed: 59 additions & 1 deletion

File tree

‎lib/internal/fs/recursive_watch.js‎

Lines changed: 2 additions & 1 deletion

‎test/parallel/test-fs-watch-enoent.js‎

Lines changed: 57 additions & 0 deletions

0 commit comments

Comments
 (0)