* src/list.c (simple_print_header): Print trailing slash
if using the transformed name.
Use had_trailing_slash instead of analyzing last byte if temp_name
if (verbose_option <= 1)
{
/* Just the fax, mam. */
- fprintf (stdlis, "%s\n", quotearg (temp_name));
+ fputs (quotearg (temp_name), stdlis);
+ if (show_transformed_names_option && st->had_trailing_slash)
+ fputc ('/', stdlis);
+ fputc ('\n', stdlis);
}
else
{
case GNUTYPE_SPARSE:
case REGTYPE:
case AREGTYPE:
- modes[0] = '-';
- if (temp_name[strlen (temp_name) - 1] == '/')
- modes[0] = 'd';
+ modes[0] = st->had_trailing_slash ? 'd' : '-';
break;
case LNKTYPE:
modes[0] = 'h';
datewidth, time_stamp);
fprintf (stdlis, " %s", quotearg (temp_name));
+ if (show_transformed_names_option && st->had_trailing_slash)
+ fputc ('/', stdlis);
switch (blk->header.typeflag)
{