From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 3A0BD1F487 for ; Tue, 2 Jul 2024 21:35:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1719956133; bh=haaaChfMfvqKzz1pwA0EXu/MnFFvXJomy0CRbXTNtnA=; h=From:To:Subject:Date:From; b=2hMjt2/hrPo8IttUisQHOcRxhiZk+jrm+FmuGSoSRNq2Dl33hNfJtEXQiFeNGwh1M xAQU9aa/3OHvEzthbTS9y5QYV0EpiGrNE47HBrZ6dILS6hMSUae4wSNmwEv9EQzI/c rDUXm9Igm9i9+eOGuZ5HY9Ynx5oqSIX0BXk7JoPE= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] lei_mirror: don't symlink(2) over bad links Date: Tue, 2 Jul 2024 21:35:32 +0000 Message-ID: <20240702213533.3941056-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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 | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm index e7c265bd..57b2d32b 100644 --- a/lib/PublicInbox/LeiMirror.pm +++ b/lib/PublicInbox/LeiMirror.pm @@ -795,6 +795,7 @@ sub update_ent { unlink($ln); } else { push @{$self->{chg}->{badlink}}, $p; + next; } } symlink($tgt, $ln);