]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
lei_mirror: note missing local manifests are non-fatal
authorEric Wong <e@80x24.org>
Thu, 9 Nov 2023 10:09:41 +0000 (10:09 +0000)
committerEric Wong <e@80x24.org>
Thu, 9 Nov 2023 21:53:51 +0000 (21:53 +0000)
Sometimes seeing that warning is alarming.

lib/PublicInbox/LeiMirror.pm

index 49febe9edb6b2976e699ae55821201c9bbc80e37..84266d03bcb2a69700b320d17261cff00633c8a9 100644 (file)
@@ -950,10 +950,11 @@ sub load_current_manifest ($) {
        if (CORE::open(my $fh, '<', $fn)) {
                decode_manifest($fh, $fn, $fn);
        } elsif ($!{ENOENT}) { # non-fatal, we can just do it slowly
-               warn "open($fn): $!\n" if !$self->{-initial_clone};
+               $self->{-initial_clone} or
+                       warn "W: open($fn): $! (non-fatal)\n";
                undef;
        } else {
-               die "open($fn): $!\n";
+               die "E: open($fn): $!\n";
        }
 }