X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FLeiALE.pm;h=cc9a2095af08e6b8f55145735ceb1e65c00cc44d;hb=23af251dd607c4e75ab1e68063f2c885c48cc035;hp=45748435b53407995a66f337359b6833ba40eb6b;hpb=0b3d4d72297f82cb43993074dfc4650a01f75683;p=public-inbox.git diff --git a/lib/PublicInbox/LeiALE.pm b/lib/PublicInbox/LeiALE.pm index 45748435..cc9a2095 100644 --- a/lib/PublicInbox/LeiALE.pm +++ b/lib/PublicInbox/LeiALE.pm @@ -28,11 +28,12 @@ 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; } - $self->refresh_externals($lxs); + $self->refresh_externals($lxs, $lei); $self; } @@ -49,7 +50,7 @@ sub overs_all { # for xoids_for (called only in lei workers?) } sub refresh_externals { - my ($self, $lxs) = @_; + my ($self, $lxs, $lei) = @_; $self->git->cleanup; my $lk = $self->lock_for_scope; my $cur_lxs = ref($lxs)->new; @@ -71,7 +72,7 @@ sub refresh_externals { } my @ibxish = $cur_lxs->locals; for my $x ($lxs->locals) { - my $d = File::Spec->canonpath($x->{inboxdir} // $x->{topdir}); + my $d = $lei->canonpath_harder($x->{inboxdir} // $x->{topdir}); $seen_ibxish{$d} //= do { $new .= "$d\n"; push @ibxish, $x; @@ -94,7 +95,7 @@ sub refresh_externals { $old = <$fh> // die "readline($f): $!"; } for my $x (@ibxish) { - $new .= File::Spec->canonpath($x->git->{git_dir})."/objects\n"; + $new .= $lei->canonpath_harder($x->git->{git_dir})."/objects\n"; } $self->{ibxish} = \@ibxish; return if $old eq $new;