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

Crash in rb-inotify if file is not accessible is not handled gracefully #557

Open
sebbASF opened this issue Apr 29, 2022 · 0 comments
Open

Comments

@sebbASF
Copy link

sebbASF commented Apr 29, 2022

I tried watching a directory on Ubuntu (20.04). This has a link to a directory containing some files which are not accessible to the logged in user.

When such a file is encountered, listen crashes (see sample below).
it would be better if it reported the issue and carried on - or at least provide the option to do so.

23: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/listener.rb:92:in `start'
22: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/fsm.rb:72:in `transition'
21: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/fsm.rb:105:in `transition_with_callbacks!'
20: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/fsm.rb:124:in `call'
19: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/fsm.rb:124:in `instance_eval'
18: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/listener.rb:71:in `block in <class:Listener>'
17: from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `start'
16: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:66:in `start'
15: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:42:in `configure'
14: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:42:in `each'
13: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/adapter/base.rb:47:in `block in configure'
12: from /var/lib/gems/2.7.0/gems/listen-3.7.1/lib/listen/adapter/linux.rb:30:in `_configure'
11: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:202:in `watch'
10: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:202:in `each'
 9: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:210:in `block in watch'
 8: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:202:in `watch'
 7: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:202:in `each'
 6: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:210:in `block in watch'
 5: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:202:in `watch'
 4: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:202:in `each'
 3: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:210:in `block in watch'
 2: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:200:in `watch'
 1: from /var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:200:in `new'

/var/lib/gems/2.7.0/gems/rb-inotify-0.10.1/lib/rb-inotify/notifier.rb:200:in `initialize': Permission denied @ dir_initialize - path/to/file (Errno::EACCES)

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

1 participant