No need to cancel the watcher on a DELETE_SELF event, Inotify2 does that internally.
Dave Rolsky [Tue, 5 May 2009 19:50:28 +0000 (19:50 +0000)]
lib/Catalyst/Watcher/Inotify.pm

index d97115d..3e4e61a 100644 (file)
@@ -60,11 +60,8 @@ sub _wait_for_events {
                 $self->_add_directory( $event->fullname );
                 push @interesting, $event;
             }
-            elsif ( $event->IN_DELETE_SELF ) {
-                $event->w->cancel;
-                push @interesting, $event;
-            }
-            elsif ( $event->fullname =~ /$regex/ ) {
+            elsif ( $event->IN_DELETE_SELF
+                    || $event->fullname =~ /$regex/ ) {
                 push @interesting, $event;
             }
         }