]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei_mirror: don't symlink(2) over bad links
authorEric Wong <e@80x24.org>
Tue, 2 Jul 2024 21:35:32 +0000 (21:35 +0000)
committerEric Wong <e@80x24.org>
Wed, 3 Jul 2024 04:37:48 +0000 (04:37 +0000)
We don't want to autodie on symlink(2) failures here.  Instead,
just note the {badlink} and display it at the end instead of
bailing out early.

lib/PublicInbox/LeiMirror.pm

index e7c265bdb7339f193fba40596d2fe87a22479a12..57b2d32be50417be44e0b146a63387c99b234bda 100644 (file)
@@ -795,6 +795,7 @@ sub update_ent {
                                        unlink($ln);
                                } else {
                                        push @{$self->{chg}->{badlink}}, $p;
+                                       next;
                                }
                        }
                        symlink($tgt, $ln);