From: Andre Noll Date: Sat, 29 Dec 2007 20:44:28 +0000 (+0100) Subject: com_ls(): Always print the basename as the subject if -lv was given. X-Git-Tag: v0.3.0~16 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=ddae5908a9f0554d9eea303f3c8a97d7e8b754a1 com_ls(): Always print the basename as the subject if -lv was given. --- 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 */