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

find.rb:38:in `block in find' #18

Closed
daemonza opened this issue Apr 12, 2012 · 5 comments
Closed

find.rb:38:in `block in find' #18

daemonza opened this issue Apr 12, 2012 · 5 comments

Comments

@daemonza
Copy link

Hi, busy testing out Listen compared to FSSM. Might be me doing something wrong, but I get this error when I delete everything in a directory, if there is more than one file. :

/Users/wernergillmer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/find.rb:38:in block in find': No such file or directory (Errno::ENOENT) from /Users/wernergillmer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/find.rb:38:incollect!'
from /Users/wernergillmer/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/find.rb:38:in find' from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/directory_record.rb:172:indetect_additions'
from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/directory_record.rb:117:in block in fetch_changes' from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/directory_record.rb:114:ineach'
from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/directory_record.rb:114:in fetch_changes' from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/listener.rb:169:inon_change'
from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/listener.rb:182:in block in initialize_adapter' from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/adapter.rb:154:incall'
from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/adapter.rb:154:in poll_changed_dirs' from /Users/wernergillmer/.rvm/gems/ruby-1.9.2-p290@rails3tutorial/gems/listen-0.4.0/lib/listen/adapters/darwin.rb:28:inblock in start'

This is the code that I am using :

require 'listen'

loop do
  Listen.to('/tmp/macbak') do |modified, added, removed|
    puts "#{modified} : #{added} : #{removed}"
  end
end

if I delete, or edit or create a file, or directory no problem. The moment I do something like rm -Rv ./* the above error occurs.

@Maher4Ever
Copy link
Contributor

This bug is confirmed. I'm working on a patch. Thanks for the report.

@Maher4Ever
Copy link
Contributor

Could you try the fix and tell us if it works for you?

@daemonza
Copy link
Author

Tested, works perfectly now. Thanks for the fix.

@thibaudgg
Copy link
Member

@Maher4Ever thanks for the quick fix. You can update the Changelog & make a new release if you want!

@Maher4Ever
Copy link
Contributor

@thibaudgg Your are most welcome :). I'll release a patch tomorrow as I can't do it today.

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

3 participants