sub new { # new saved search "lei q --save"
my ($cls, $lei) = @_;
my $self = bless { ale => $lei->ale }, $cls;
+ require File::Path;
my $dst = $lei->{ovv}->{dst};
+
+ # canonicalize away relative paths into the config
+ if ($lei->{ovv}->{fmt} eq 'maildir' &&
+ $dst =~ m!(?:/*|\A)\.\.(?:/*|\z)! && !-d $dst) {
+ File::Path::make_path($dst);
+ $lei->{ovv}->{dst} = $dst = $lei->abs_path($dst);
+ }
my $dir = lss_dir_for($lei, \$dst);
- require File::Path;
File::Path::make_path($dir); # raises on error
$self->{-cfg} = {};
my $f = $self->{'-f'} = "$dir/lei.saved-search";
$oidx->commit_lazy;
}
+sub reset_dedupe {
+ my ($self) = @_;
+ prepare_dedupe($self);
+ my $lk = $self->lock_for_scope_fast;
+ for my $t (qw(xref3 over id2num)) {
+ $self->{oidx}->{dbh}->do("DELETE FROM $t");
+ }
+ pause_dedupe($self);
+}
+
sub mm { undef }
sub altid_map { {} }