Skip to content

Commit

Permalink
Recursively watch subdirectories with the inotify backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
nex3 committed Feb 7, 2010
1 parent 9528c5c commit f4b8967
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/fssm/backends/inotify.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ def initialize
end

def add_handler(handler, preload=true)
@notifier.watch(handler.path.to_s, :attrib, :modify, :create,
@notifier.watch(handler.path.to_s, :recursive, :attrib, :modify, :create,
:delete, :delete_self, :moved_from, :moved_to, :move_self) do |event|
path = FSSM::Pathname.for(event.absolute_name)
path = path.dirname unless event.name == "" # Event on root directory
Expand Down
2 changes: 1 addition & 1 deletion lib/fssm/support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def rb_inotify?
require 'rb-inotify'
if defined?(INotify::VERSION)
version = INotify::VERSION
version[0] > 0 || version[1] > 5 || version[2] >= 1
version[0] > 0 || version[1] >= 6
end
rescue LoadError
false
Expand Down

0 comments on commit f4b8967

Please sign in to comment.