From ddae5908a9f0554d9eea303f3c8a97d7e8b754a1 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 29 Dec 2007 21:44:28 +0100 Subject: [PATCH] com_ls(): Always print the basename as the subject if -lv was given. --- aft.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aft.c b/aft.c index 6481f3e4..2b7a7af7 100644 --- a/aft.c +++ b/aft.c @@ -886,13 +886,15 @@ static int print_list_item(struct ls_data *d, struct ls_options *opts, lyrics_lines = make_lyrics_lines(afsi); image_lines = make_image_lines(afsi); filename_lines = make_filename_lines(d->path, opts->flags); - if (opts->mode == LS_MODE_MBOX) + if (opts->mode == LS_MODE_MBOX) { + const char *bn = para_basename(d->path); para_printf(b, "From foo@localhost %s\n" "Received: from\nTo: bar\nFrom: a\n" "Subject: %s\n\n", last_played_time, - d->path); + bn? bn : "?"); + } para_printf(b, "%s" /* filename stuff */ "%s%s%s%s" /* score */ -- 2.39.5