unofficial mirror of meta@public-inbox.org
 help / color / mirror / Atom feed
* [PATCH] lei_mirror: don't symlink(2) over bad links
@ 2024-07-02 21:35 Eric Wong
  2024-07-02 23:56 ` [PATCH 2/1] lei_mirror: show FS path for symlink conflicts Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Wong @ 2024-07-02 21:35 UTC (permalink / raw)
  To: meta

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);

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-02 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02 21:35 [PATCH] lei_mirror: don't symlink(2) over bad links Eric Wong
2024-07-02 23:56 ` [PATCH 2/1] lei_mirror: show FS path for symlink conflicts Eric Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).