diff options
Diffstat (limited to 'lib/PublicInbox')
-rw-r--r-- | lib/PublicInbox/View.pm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 93a5b329..a05ac414 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -499,6 +499,11 @@ sub submsg_hdr ($$) { sub attach_link ($$$$;$) { my ($ctx, $ct, $p, $fn, $err) = @_; my ($part, $depth, $idx) = @$p; + + # Eml iteration clobbers multipart ->{bdy}, so do not offer + # downloads for 0-byte multipart attachments + return unless $part->{bdy}; + my $nl = $idx eq '1' ? '' : "\n"; # like join("\n", ...) my $size = bytes::length($part->body); |