X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=ab4ea1c2bdc1c6b1ec0f58e49d1e13af788b859a;hp=87e52bbc0e81a7f8b0c4c7ca5c374cfdbb5da068;hb=df483ed4bd8b7ce6004368860b0130784546bb64;hpb=1abc33833149f6c71850c1b6f4bdeca38c718023 diff --git a/notmuch-show.c b/notmuch-show.c index 87e52bbc..ab4ea1c2 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see http://www.gnu.org/licenses/ . + * along with this program. If not, see https://www.gnu.org/licenses/ . * * Author: Carl Worth */ @@ -133,7 +133,20 @@ format_message_sprinter (sprinter_t *sp, notmuch_message_t *message) sp->boolean (sp, notmuch_message_get_flag (message, NOTMUCH_MESSAGE_FLAG_EXCLUDED)); sp->map_key (sp, "filename"); - sp->string (sp, notmuch_message_get_filename (message)); + if (notmuch_format_version >= 3) { + notmuch_filenames_t *filenames; + + sp->begin_list (sp); + for (filenames = notmuch_message_get_filenames (message); + notmuch_filenames_valid (filenames); + notmuch_filenames_move_to_next (filenames)) { + sp->string (sp, notmuch_filenames_get (filenames)); + } + notmuch_filenames_destroy (filenames); + sp->end (sp); + } else { + sp->string (sp, notmuch_message_get_filename (message)); + } sp->map_key (sp, "timestamp"); date = notmuch_message_get_date (message); @@ -904,7 +917,7 @@ do_show_single (void *ctx, return 1; if (count != 1) { - fprintf (stderr, "Error: search term did not match precisely one message.\n"); + fprintf (stderr, "Error: search term did not match precisely one message (matched %d messages).\n", count); return 1; }