lib/PublicInbox/Config.pm | 4 ++++ diff --git a/lib/PublicInbox/Config.pm b/lib/PublicInbox/Config.pm index 228de4ffe88f631fbccbaee594087a8680adcafd..26ac298eddb86f2256c4618d7abef920f7a4b95d 100644 --- a/lib/PublicInbox/Config.pm +++ b/lib/PublicInbox/Config.pm @@ -510,6 +510,10 @@ eval { require PublicInbox::ExtSearch } or return; my $pfx = "extindex.$name"; my $d = $self->{"$pfx.topdir"} // return; -d $d or return; + if (index($d, "\n") >= 0) { + warn "E: `$d' must not contain `\\n'\n"; + return; + } my $es = PublicInbox::ExtSearch->new($d); for my $k (qw(indexlevel indexsequentialshard)) { my $v = _one_val($self, $pfx, $k) // next;