lib/PublicInbox/LEI.pm | 6 ++++++ diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index e521176429cb845d78eb7be7603c7380640cc417..d534f1d04e8dfce9747b73efbad230c18368c220 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -705,6 +705,12 @@ if ($sto && File::Spec->canonpath($sto_dir) eq File::Spec->canonpath($cfg->{'leistore.dir'})) { $cfg->{-lei_store} = $sto; } + if (scalar(keys %PATH2CFG) > 5) { + # FIXME: use inotify/EVFILT_VNODE to detect unlinked configs + for my $k (keys %PATH2CFG) { + delete($PATH2CFG{$k}) unless -f $k + } + } $self->{cfg} = $PATH2CFG{$f} = $cfg; }