]> Dogcows Code - chaz/tar/blobdiff - src/list.c
(sort_obstack): Fixed typo in the comment
[chaz/tar] / src / list.c
index cb14c79bb8ee01240844e0931185e916f9d4903d..fdc8fa9975b14cb7b81e4d0e72fa9323f4076d18 100644 (file)
@@ -130,10 +130,19 @@ read_and (void (*do_something) (void))
            }
 
          set_next_block_after (current_header);
+
+         if (!ignore_zeros_option)
+           {
+             char buf[UINTMAX_STRSIZE_BOUND];
+
+             status = read_header (false);
+             if (status == HEADER_ZERO_BLOCK)
+               break;
+             WARN ((0, 0, _("A lone zero block at %s"),
+                    STRINGIFY_BIGINT (current_block_ordinal (), buf)));
+           }
          status = prev_status;
-         if (ignore_zeros_option)
-           continue;
-         break;
+         continue;
 
        case HEADER_END_OF_FILE:
          if (block_number_option)
@@ -559,8 +568,7 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
     }
 
   current_stat_info.archive_file_size = current_stat_info.stat.st_size;
-  if (extended_header.size)
-    xheader_decode (stat_info);
+  xheader_decode (stat_info);
 }
 
 /* Convert buffer at WHERE0 of size DIGS from external format to
@@ -1096,7 +1104,8 @@ print_header (struct tar_stat_info *st, off_t block_ordinal)
                   uintbuf));
          break;
        default:
-         strcpy (size, STRINGIFY_BIGINT (st->stat.st_size, uintbuf));
+         /* st->stat.st_size keeps stored file size */
+         strcpy (size, STRINGIFY_BIGINT (st->archive_file_size, uintbuf));
          break;
        }
 
This page took 0.027971 seconds and 4 git commands to generate.