-
Notifications
You must be signed in to change notification settings - Fork 247
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
Listen crashes on inaccessable directories (Errno::EACCES) #251
Comments
@parkr @gjtorikian Just putting this on your radar... |
"ignore" in The problem here is that I didn't consider someone would have an inaccessible folder being watched. It's probably enough to add a test case for this and wrap the Dir.entries within a SystemCallError rescue block. The best solution - if you're e.g. testing permissions - is to not watch those folders (since you don't have access, there's no point anyway). Again, ignoring has nothing to do with this. I might get to this, but it's not a top priority right now - but don't hesitate to take a stab at a PR and ask for review/info. |
2 different issues here:
Listen doesn't crash any more (fixed on master), but to prevent rb-inotify from crashing for the same reason, #274 has to be implemented So I'm closing this (no bug to fix in Listen itself). Workarounds
Best solutionGetting #274 implemented of course - since everyone benefits |
Given the following very basic program (let's call it
test.rb
):Also given the following output from
ls -l
:total 8 drwx------ 2 root staff 68 Sep 5 16:02 test -rw-r--r-- 1 chris staff 149 Sep 5 16:10 test.rb
The program will crash with the following error when run:
This is despite the fact that
[/test/]
was given as the:ignore
parameter toListen.to
!The culprit appears to be a call to
Dir.entries
in the_fast_build
method:Why does Listen have to call
Dir.entries
on ignored directories? Shouldn't those be excluded?The text was updated successfully, but these errors were encountered: