about summary refs log tree commit homepage
path: root/lib/PublicInbox/MsgIter.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/PublicInbox/MsgIter.pm')
-rw-r--r--lib/PublicInbox/MsgIter.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/PublicInbox/MsgIter.pm b/lib/PublicInbox/MsgIter.pm
index cd5a5d99..7c28d019 100644
--- a/lib/PublicInbox/MsgIter.pm
+++ b/lib/PublicInbox/MsgIter.pm
@@ -20,12 +20,14 @@ sub em_each_part ($$;$$) {
                 my $i = 0;
                 @parts = map { [ $_, 1, ++$i ] } @parts;
                 while (my $p = shift @parts) {
-                        my ($part, $depth, @idx) = @$p;
+                        my ($part, $depth, $idx) = @$p;
                         my @sub = $part->subparts;
                         if (@sub) {
                                 $depth++;
                                 $i = 0;
-                                @sub = map { [ $_, $depth, @idx, ++$i ] } @sub;
+                                @sub = map {
+                                        [ $_, $depth, "$idx.".(++$i) ]
+                                } @sub;
                                 @parts = (@sub, @parts);
                         } else {
                                 $cb->($p, $cb_arg);