about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-01-23 10:27:55 +0000
committerEric Wong <e@80x24.org>2021-01-24 10:08:16 +0000
commit6a0a324f2dd354c17ccc7a97604c5b1e17bea18e (patch)
tree58e80d4e282e0ed768c73b69f7ed4e580d6fec80 /lib
parent44c1e25436c5a4cc7b11a159aac05cfc60c37c17 (diff)
downloadpublic-inbox-6a0a324f2dd354c17ccc7a97604c5b1e17bea18e.tar.gz
At least not yet, though we may support mirroring via git.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LeiExternal.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiExternal.pm b/lib/PublicInbox/LeiExternal.pm
index e7693e09..bf07c41c 100644
--- a/lib/PublicInbox/LeiExternal.pm
+++ b/lib/PublicInbox/LeiExternal.pm
@@ -58,6 +58,9 @@ sub lei_add_external {
         my $cfg = $self->_lei_cfg(1);
         my $new_boost = $self->{opt}->{boost} // 0;
         $location = _canonicalize($location);
+        if ($location !~ m!\Ahttps?://! && !-d $location) {
+                return $self->fail("$location not a directory");
+        }
         my $key = "external.$location.boost";
         my $cur_boost = $cfg->{$key};
         return if defined($cur_boost) && $cur_boost == $new_boost; # idempotent