I got the following crash (node-watch 0.7.1) when attempting to watch Program files recursively on Ubuntu Bash for Windows:
Error: EACCES: permission denied, watch '/mnt/c/Program Files (x86)/Google/CrashReports'
at FSWatcher.<computed> (internal/fs/watchers.js:218:26)
at Object.watch (fs.js:1525:34)
at fn (/package/dist/webpack:/airdcpp-share-monitor/node_modules/node-watch/lib/watch.js:397:22)
at hasNativeRecursive (/package/dist/webpack:/airdcpp-share-monitor/node_modules/node-watch/lib/has-native-recursive.js:61:12)
at b.watchDirectory (/package/dist/webpack:/airdcpp-share-monitor/node_modules/node-watch/lib/watch.js:380:3)
at fn (/package/dist/webpack:/airdcpp-share-monitor/node_modules/node-watch/lib/watch.js:413:16)
at forEach (/package/dist/webpack:/airdcpp-share-monitor/node_modules/node-watch/lib/watch.js:142:35)
The same crash also happens when the system limit for maximum watches is reached (ENOSPC).
Looks like the errors aren't caught when the library iterates recursively over subdirectories and calls fs.watch for each of them. Could watcher's error handler be called in such cases?
I got the following crash (node-watch 0.7.1) when attempting to watch Program files recursively on Ubuntu Bash for Windows:
The same crash also happens when the system limit for maximum watches is reached (
ENOSPC
).Looks like the errors aren't caught when the library iterates recursively over subdirectories and calls
fs.watch
for each of them. Could watcher's error handler be called in such cases?