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

Commit d418ca1

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 2fd50ae commit d418ca1

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)