From bf963d16a434f3aa9fe903e1299ac86852ecd3c6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 18 Jun 2016 22:23:52 +0000 Subject: watch_maildir: add scan test This should be portable despite the intended use of this directory being non-portable. --- lib/PublicInbox/WatchMaildir.pm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/WatchMaildir.pm') diff --git a/lib/PublicInbox/WatchMaildir.pm b/lib/PublicInbox/WatchMaildir.pm index 35363755..f1a21b9b 100644 --- a/lib/PublicInbox/WatchMaildir.pm +++ b/lib/PublicInbox/WatchMaildir.pm @@ -45,10 +45,14 @@ sub new { }, $class; } +sub _done_for_now { + $_->done foreach values %{$_[0]->{importers}}; +} + sub _try_fsn_paths { my ($self, $paths) = @_; _try_path($self, $_->{path}) foreach @$paths; - $_->done foreach values %{$self->{importers}}; + _done_for_now($self); } sub _try_path { @@ -133,6 +137,7 @@ sub scan { } closedir $dh; } + _done_for_now($self); } 1; -- cgit v1.2.3-24-ge0c7