From: Carl Worth Date: Mon, 23 May 2011 21:27:23 +0000 (-0700) Subject: notmuch part: Fix part numbering to match what's reported by "notmuch show" X-Git-Tag: debian/0.6_254~141 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=02ec2e420c36957fbd903c424b69a9690b400671 notmuch part: Fix part numbering to match what's reported by "notmuch show" Since commit c51d5b3cdb5ca0816816e88ca6f7136a24e74eee we are counting multipart containers when emitting part numbers in the "notmuch show" output. Unfortunately, "notmuch part" wasn't updated with the same numbering, (and the test suite is inadequate to catch this). Fix this by adding a similar part-numbering change to "notmuch part" here. --- diff --git a/show-message.c b/show-message.c index 44ab8194..3c29f26a 100644 --- a/show-message.c +++ b/show-message.c @@ -138,6 +138,8 @@ show_one_part_worker (GMimeObject *part, int *part_count, int desired_part) GMimeMultipart *multipart = GMIME_MULTIPART (part); int i; + *part_count = *part_count + 1; + for (i = 0; i < g_mime_multipart_get_count (multipart); i++) { show_one_part_worker (g_mime_multipart_get_part (multipart, i), part_count, desired_part);