about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LEI.pm6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm
index e5211764..d534f1d0 100644
--- a/lib/PublicInbox/LEI.pm
+++ b/lib/PublicInbox/LEI.pm
@@ -705,6 +705,12 @@ sub _lei_cfg ($;$) {
                         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;
 }