$lei->{opt}->{'mail-sync'} = 1; # for prepare_inputs
$self->prepare_inputs($lei, \@folders) or return;
my $ops = {};
- $lei->{auth}->op_merge($ops, $self) if $lei->{auth};
+ $lei->{auth}->op_merge($ops, $self, $lei) if $lei->{auth};
(my $op_c, $ops) = $lei->workers_start($self, 1, $ops);
$lei->{wq1} = $self;
$lei->{-err_type} = 'non-fatal';
my ($lei, @argv) = @_;
my $lms = $lei->lms or return ();
my $match_cb = $lei->complete_url_prepare(\@argv);
- my @k = $lms->folders($argv[-1], 1);
+ my @k = $lms->folders($argv[-1] // undef, 1);
my @m = map { $match_cb->($_) } @k;
@m ? @m : @k
}