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 EPERM error on Windows when dir deleted #28

Closed
jgoz opened this issue Oct 10, 2014 · 0 comments · Fixed by #29
Closed

Unhandled EPERM error on Windows when dir deleted #28

jgoz opened this issue Oct 10, 2014 · 0 comments · Fixed by #29

Comments

@jgoz
Copy link
Contributor

jgoz commented Oct 10, 2014

On Windows, when a watched directory is deleted, an EPERM error is thrown when attempting to stat the change. This can be observed by running the test suite on Windows:

> sane@0.8.0 test 'C:\path\to\sane'
> mocha --bail


  ....................

  19 passing (26s)
  1 failing

  1) sane in normal mode sane(file) removing a dir will emit delete event:
     Uncaught Error: EPERM, stat 'C:\temp\path\to\sane_test\sub_9\file_0'

This happens because fs.stat on win32 will receive an EPERM error instead of ENOENT when attempting to stat a non-existent directory. As far as I can tell, this is similar but not related to nodejs/node-v0.x-archive#4337.

A pull request fixing the issue will be forthcoming.

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

Successfully merging a pull request may close this issue.

1 participant