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:54 +0000
committerEric Wong <e@80x24.org>2021-01-23 23:45:33 +0000
commit44c1e25436c5a4cc7b11a159aac05cfc60c37c17 (patch)
tree758bda1b45dd5e6a3adf39165b66441d5194357f /lib
parent00d6a4a403e7b36e91c68f8a47252b5d6db0d577 (diff)
downloadpublic-inbox-44c1e25436c5a4cc7b11a159aac05cfc60c37c17.tar.gz
Pathname/URL canonicalization may not change the result at
all, so there's no point in trying (and failing) the same
form twice if pre and post-canonicalization are identical.
Diffstat (limited to 'lib')
-rw-r--r--lib/PublicInbox/LeiExternal.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/PublicInbox/LeiExternal.pm b/lib/PublicInbox/LeiExternal.pm
index 5b5f08d1..e7693e09 100644
--- a/lib/PublicInbox/LeiExternal.pm
+++ b/lib/PublicInbox/LeiExternal.pm
@@ -69,9 +69,11 @@ sub lei_forget_external {
         my ($self, @locations) = @_;
         my $cfg = $self->_lei_cfg(1);
         my $quiet = $self->{opt}->{quiet};
+        my %seen;
         for my $loc (@locations) {
                 my (@unset, @not_found);
                 for my $l ($loc, _canonicalize($loc)) {
+                        next if $seen{$l}++;
                         my $key = "external.$l.boost";
                         delete($cfg->{$key});
                         $self->_config('--unset', $key);