From a6823087e5aa9699a42c31df16323885c70d1b4d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 11 Jan 2019 00:59:51 +0000 Subject: v2writable: ->purge returns undef on no-op And doesn't try to access undef as an array ref. --- lib/PublicInbox/V2Writable.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/PublicInbox/V2Writable.pm') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 222df5c2..08d18fc0 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -390,7 +390,7 @@ sub purge { my ($self, $mime) = @_; my $purges = $self->{-inbox}->with_umask(sub { remove_internal($self, $mime, undef, {}); - }); + }) or return; $self->idx_init if @$purges; # ->done is called on purges for my $i (0..$#$purges) { defined(my $cmt = $purges->[$i]) or next; -- cgit v1.2.3-24-ge0c7