diff options
-rw-r--r-- | lib/PublicInbox/Eml.pm | 2 | ||||
-rw-r--r-- | lib/PublicInbox/MsgIter.pm | 2 | ||||
-rw-r--r-- | t/eml.t | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/PublicInbox/Eml.pm b/lib/PublicInbox/Eml.pm index d2bd3915..ec682b91 100644 --- a/lib/PublicInbox/Eml.pm +++ b/lib/PublicInbox/Eml.pm @@ -237,7 +237,7 @@ sub mp_descend ($$) { sub each_part { my ($self, $cb, $arg, $once, $all) = @_; my $p = mp_descend($self, $once // 0) or - return $cb->([$self, 0, 0], $arg); + return $cb->([$self, 0, 1], $arg); $cb->([$self, 0, 0], $arg) if ($all || $self->{-call_cb}); # rare diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm index 5ec2a4d9..bb1dfead 100644 --- a/lib/PublicInbox/MsgIter.pm +++ b/lib/PublicInbox/MsgIter.pm @@ -34,7 +34,7 @@ sub em_each_part ($$;$$) { } } } else { - $cb->([$mime, 0, 0], $cb_arg); + $cb->([$mime, 0, 1], $cb_arg); } } @@ -169,7 +169,7 @@ EOF is(scalar(@tmp), 1, 'got one part even w/o boundary'); is($tmp[0]->[0]->[0]->body, "hello world\n", 'body preserved'); is($tmp[0]->[0]->[1], 0, '$depth is zero'); - is($tmp[0]->[0]->[2], 0, '@idx is zero'); + is($tmp[0]->[0]->[2], 1, '@idx is one'); } # I guess the following only worked in PI::M because of a happy accident |