about summary refs log tree commit homepage
path: root/lib/PublicInbox/LeiQuery.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/LeiQuery.pm')
-rw-r--r--lib/PublicInbox/LeiQuery.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/PublicInbox/LeiQuery.pm b/lib/PublicInbox/LeiQuery.pm
index 148e8524..84996e7e 100644
--- a/lib/PublicInbox/LeiQuery.pm
+++ b/lib/PublicInbox/LeiQuery.pm
@@ -50,11 +50,11 @@ sub lei_q {
         # --local is enabled by default unless --only is used
         # we'll allow "--only $LOCATION --local"
         my $sto = $self->_lei_store(1);
-        my $lse = $sto->search;
         if (($opt->{'import-remote'} //= 1) |
                         (($opt->{'import-before'} //= \1) ? 1 : 0)) {
                 $sto->write_prepare($self);
         }
+        my $lse = $sto->search;
         if ($opt->{'local'} //= scalar(@only) ? 0 : 1) {
                 $lxs->prepare_external($lse);
         }