]> Dogcows Code - chaz/tar/blobdiff - src/list.c
Drop en_GB locale; it was more trouble than it was worth (e.g., different
[chaz/tar] / src / list.c
index 0fdcc2e1406dba1d37455a682041b0906a4ec8dc..4ecd5b1cd1999da9f544708538a9c44909ab026b 100644 (file)
@@ -421,6 +421,7 @@ read_header (bool raw_extended_headers)
              recent_long_name = 0;
              recent_long_name_blocks = 0;
            }
+         assign_string (&orig_file_name, name);
          assign_string (&current_file_name, name);
          current_trailing_slash = strip_trailing_slashes (current_file_name);
 
@@ -903,6 +904,8 @@ print_header (off_t block_ordinal)
 {
   char modes[11];
   char const *time_stamp;
+  char *temp_name = orig_file_name ? orig_file_name : current_file_name;
+  
   /* These hold formatted ints.  */
   char uform[UINTMAX_STRSIZE_BOUND], gform[UINTMAX_STRSIZE_BOUND];
   char *user, *group;
@@ -925,10 +928,7 @@ print_header (off_t block_ordinal)
   if (verbose_option <= 1)
     {
       /* Just the fax, mam.  */
-      fprintf (stdlis, "%s", quotearg (current_file_name));
-      if (current_trailing_slash)
-       fprintf (stdlis, "/");
-      fprintf (stdlis, "\n");
+      fprintf (stdlis, "%s\n", quotearg (temp_name));
     }
   else
     {
@@ -959,7 +959,7 @@ print_header (off_t block_ordinal)
        case REGTYPE:
        case AREGTYPE:
          modes[0] = '-';
-         if (current_file_name[strlen (current_file_name) - 1] == '/')
+         if (temp_name[strlen (temp_name) - 1] == '/')
            modes[0] = 'd';
          break;
        case LNKTYPE:
@@ -1073,7 +1073,7 @@ print_header (off_t block_ordinal)
       fprintf (stdlis, "%s %s/%s %*s%s %s",
               modes, user, group, ugswidth - pad, "", size, time_stamp);
 
-      fprintf (stdlis, " %s", quotearg (current_file_name));
+      fprintf (stdlis, " %s", quotearg (temp_name));
 
       switch (current_header->header.typeflag)
        {
This page took 0.021402 seconds and 4 git commands to generate.