From 14b0adbad206a1f78373e7b16602ed341cfdac2a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 2 Sep 2025 07:21:18 +0000 Subject: [PATCH] v2writable: don't attempt to print defrag progress w/o -v Otherwise we'd crash when attempting to use `undef' as a subroutine reference :x --- lib/PublicInbox/V2Writable.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index bd5d9d320..aea215cff 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -531,7 +531,7 @@ sub do_defrag ($) { $pr->('defrag took ', sprintf('%ums', now - $t0), ", next defrag: >=#$self->{defrag_at} ", - "(cur: $self->{oidx}->{-art_max})\n"); + "(cur: $self->{oidx}->{-art_max})\n") if $pr; } else { # defrag not supported (or needed, maybe) delete $self->{defrag_at}; } -- 2.47.3