about summary refs log tree commit homepage
path: root/lib/PublicInbox/DirIdle.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/DirIdle.pm')
-rw-r--r--lib/PublicInbox/DirIdle.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/PublicInbox/DirIdle.pm b/lib/PublicInbox/DirIdle.pm
index 7031e5fd..65896f95 100644
--- a/lib/PublicInbox/DirIdle.pm
+++ b/lib/PublicInbox/DirIdle.pm
@@ -56,10 +56,13 @@ sub new {
 sub add_watches {
         my ($self, $dirs, $gone) = @_;
         my $fl = $MAIL_IN | ($gone ? $MAIL_GONE : 0);
+        my @ret;
         for my $d (@$dirs) {
-                $self->{inot}->watch($d, $fl);
+                my $w = $self->{inot}->watch($d, $fl) or next;
+                push @ret, $w;
         }
         PublicInbox::FakeInotify::poll_once($self) if !$ino_cls;
+        @ret
 }
 
 sub rm_watches {