Skip to content

Instantly share code, notes, and snippets.

@kazeburo
Created October 23, 2009 08:22
Show Gist options
  • Save kazeburo/216746 to your computer and use it in GitHub Desktop.
Save kazeburo/216746 to your computer and use it in GitHub Desktop.
diff --git a/lib/Filesys/Notify/Simple.pm b/lib/Filesys/Notify/Simple.pm
index 70df639..44f4828 100644
--- a/lib/Filesys/Notify/Simple.pm
+++ b/lib/Filesys/Notify/Simple.pm
@@ -47,7 +47,8 @@ sub wait_inotify2 {
Linux::Inotify2->import;
my $inotify = Linux::Inotify2->new;
- for my $path (@path) {
+ my $fs = _full_scan(@path);
+ for my $path (keys %$fs) {
$inotify->watch($path, &IN_MODIFY|&IN_CREATE|&IN_DELETE|&IN_DELETE_SELF|&IN_MOVE_SELF);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment