+ my ($self) = @_;
+ my $importers = $self->{importers};
+ foreach my $im (values %$importers) {
+ $im->done if $im->{nchg};
+ }
+
+ my $opendirs = $self->{opendirs};
+
+ # spamdir scanning means every importer remains open
+ my $spamdir = $self->{spamdir};
+ return if defined($spamdir) && $opendirs->{$spamdir};
+
+ foreach my $im (values %$importers) {
+ # not done if we're scanning
+ next if $opendirs->{$im->{git}->{git_dir}};
+ $im->done;
+ }