This may help track down problems associated with a single
directory. Note we emit a separate message for each of the
`new' and `cur' subdirectories of a Maildir. Full scans only
happen at startup (or manually), so it shouldn't be too noisy
if logging to syslog.
Requested-by: Robin H. Johnson <robbat2@orbis-terrarum.net>
my $dh;
if (ref($dir) eq 'ARRAY') { # continue existing
($dir, $dh) = @$dir;
- } elsif (!opendir($dh, $dir)) {
+ } elsif (opendir($dh, $dir)) {
+ warn "# scanning $dir ...\n";
+ } else {
warn "W: failed to open $dir: $! (non-fatal)\n";
next;
}
if ($n < 0) {
unshift @{$self->{scan_q}}, [ $dir, $dh ];
last;
+ } else {
+ warn "# done scanning $dir\n";
}
}
_done_for_now($self);