diff options
author | Eric Wong <e@80x24.org> | 2021-05-02 06:05:42 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-05-03 18:45:27 +0000 |
commit | e77f38470abdd0f4df8c2469c36f17188f0df64c (patch) | |
tree | 9ada7c97f3329d908509221a1cb75145952d7aaa /lib/PublicInbox/LeiQuery.pm | |
parent | 91f60a476b2407d21d5f85e832164699d4e407ec (diff) | |
download | public-inbox-e77f38470abdd0f4df8c2469c36f17188f0df64c.tar.gz |
lei <q|up>: writes to Maildirs and IMAP use mail-sync
This will allow keyword updates from other folders to propagate to folders where search results may be duplicated.
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r-- | lib/PublicInbox/LeiQuery.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm index efe328cc..1999a534 100644 --- a/lib/PublicInbox/LeiQuery.pm +++ b/lib/PublicInbox/LeiQuery.pm @@ -29,10 +29,9 @@ sub _start_query { # used by "lei q" and "lei up" return $self->fail("`$mj' writer jobs must be >= 1"); } my $l2m = $self->{l2m}; - if ($l2m && ($opt->{'import-remote'} //= 1) | - # we use \1 (a ref) to distinguish between - # user-supplied and default value - (($opt->{'import-before'} //= \1) ? 1 : 0)) { + # we use \1 (a ref) to distinguish between default vs. user-supplied + if ($l2m && grep { $opt->{$_} //= \1 } (qw(mail-sync import-remote + import-before))) { $self->_lei_store(1)->write_prepare($self); } $l2m and $l2m->{-wq_nr_workers} = $mj // do { |