]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei_ale: do not create store unnecessarily
authorEric Wong <e@80x24.org>
Sat, 27 Mar 2021 11:45:48 +0000 (11:45 +0000)
committerEric Wong <e@80x24.org>
Sat, 27 Mar 2021 18:10:25 +0000 (18:10 +0000)
We want to be able to read blobs without writing anything to
disk.

lib/PublicInbox/LeiALE.pm

index 45748435b53407995a66f337359b6833ba40eb6b..cb570ab4bf8edfd050e424482574372d2fbe0dd2 100644 (file)
@@ -28,7 +28,8 @@ sub new {
        my ($self, $lei) = @_;
        ref($self) or $self = _new($lei->cache_dir . '/all_locals_ever.git');
        my $lxs = PublicInbox::LeiXSearch->new;
-       $lxs->prepare_external($lei->_lei_store(1)->search);
+       my $sto = $lei->_lei_store;
+       $lxs->prepare_external($sto->search) if $sto;
        for my $loc ($lei->externals_each) { # locals only
                $lxs->prepare_external($loc) if -d $loc;
        }