Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled 'error' event when deleting directory #1

Closed
jojobyte opened this issue Feb 25, 2013 · 2 comments
Closed

Unhandled 'error' event when deleting directory #1

jojobyte opened this issue Feb 25, 2013 · 2 comments

Comments

@jojobyte
Copy link

I get the following error if I delete a directory that is within the directory I am watching. It crashes the node server. I'm on Windows 8 64bit.

events.js:71
    throw arguments[1]; // Unhandled 'error'event

Error: watch EPERM
    at errnoException (fs.js:806:11)
    at FSEvent._handle.onchange (fs.js:824:26)

It happens on both hard delete and deleting to recycle bin, and whether the directory is empty or not.

When using pure fs.watch it does not happen, although oddly fs.watch reports a rename event, not a delete or remove.

@yuanchuan
Copy link
Owner

Thanks for reporting!

Actually the unhandled error was caused by the fs.watch. Its underlying implemetation varies across platforms as stated in this issue, same problem.

Anyway I've submited a quick patch for this issue by handling the error silenlty. Just do npm update node-watch and hope that will work for your code.

@jojobyte
Copy link
Author

Awesome. Worked Great. Thanks for fixing that so fast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants