Error when deleting subfolder
Closed this issue · 1 comments
I am using hound v1.0.5 and Node.js 8.4.0
This is my code to watch a directory. When I now create a folder in the test directory, the creation of this event gets recognized and works fine. But when I try to delete this folder now an error message appears. See bottom of the page for error message.
`var hound = require('hound');
// Create a directory tree watcher.
watcher = hound.watch('./test');
// Add callbacks for file and directory events. The change event only applies
// to files.
watcher.on('create', function(file, stats) {
console.log(file + ' was created')
});
watcher.on('change', function(file, stats) {
console.log(file + ' was changed')
});
watcher.on('delete', function(file) {
console.log(file + ' was deleted')
});`
Error message:
`events.js:182
throw er; // Unhandled 'error' event
^
Error: Error watching file for changes: EPERM
at _errnoException (util.js:1041:11)
at FSEvent.FSWatcher._handle.onchange (fs.js:1359:9)`
Sorry for the delay, I took over this node-hound from the original author and was not subscribed to the repository.
EPERM is a posix error that means you don't have permission to read / write to a file or directory.
In my experience this isn't usually a permissions issue, it's usually because some antivirus software is scanning my current working directory.
Do you have antivirus software?