From: Eric Wong Date: Tue, 2 Sep 2025 07:21:18 +0000 (+0000) Subject: v2writable: don't attempt to print defrag progress w/o -v X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14b0adbad206a1f78373e7b16602ed341cfdac2a;p=thirdparty%2Fpublic-inbox.git 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 --- 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}; }