my ($ibx) = @_;
eval {
my $im = _importer_for($self, $ibx);
- $im->remove($mime);
+ $im->remove($mime, 'spam');
if (my $scrub = _scrubber_for($ibx)) {
my $scrubbed = $scrub->scrub($mime) or return;
$scrubbed == 100 and return;
- $im->remove($scrubbed);
+ $im->remove($scrubbed, 'spam');
}
};
if ($@) {
sub trigger_scan {
my ($self, $base) = @_;
- my $dir = $self->{scandir} or die "not watch-ing, yet\n";
+ my $dir = $self->{scandir} or return;
open my $fh, '>', "$dir/$base" or die "open $dir/$base failed: $!\n";
close $fh or die "close $dir/$base failed: $!\n";
}
if ($path =~ /quit\z/) {
%{$self->{opendirs}} = ();
_done_for_now($self);
+ delete $self->{scandir};
$self->{quit} = 1;
return;
}