my $key = "external.$location.boost";
my $cur_boost = $cfg->{$key};
return if defined($cur_boost) && $cur_boost == $new_boost; # idempotent
+ if (-d $location) {
+ require PublicInbox::LeiXSearch;
+ my $lxs = PublicInbox::LeiXSearch->new;
+ $lxs->prepare_external($location);
+ $self->ale->refresh_externals($lxs);
+ }
$self->lei_config($key, $new_boost);
}
$self->fail(<<""); # TODO: did you mean "update-external?"
--mirror destination `$location' already exists
+ } elsif (-d $location) {
+ index($location, "\n") >= 0 and
+ return $self->fail("`\\n' not allowed in `$location'");
}
if ($location !~ m!\Ahttps?://! && !-d $location) {
$mirror // return $self->fail("$location not a directory");
+ index($location, "\n") >= 0 and
+ return $self->fail("`\\n' not allowed in `$location'");
$mirror = ext_canonicalize($mirror);
require PublicInbox::LeiMirror;
PublicInbox::LeiMirror->start($self, $mirror => $location);