]> Dogcows Code - chaz/tar/blobdiff - src/list.c
(extract_archive): Use sparse_member_p instead of GNUTYPE_SPARSE.
[chaz/tar] / src / list.c
index b8a1b177dd2ea909bfed346cb49b56ed7779b935..f5684c443aa30b3ca97b282469c4914b3740c4f2 100644 (file)
@@ -20,7 +20,7 @@
    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 /* Define to non-zero for forcing old ctime format instead of ISO format.  */
-#undef USE_OLD_CTIME
+#undef USE_OLD_CTIME 
 
 #include "system.h"
 #include <quotearg.h>
@@ -140,6 +140,7 @@ read_and (void (*do_something) (void))
                break;
              WARN ((0, 0, _("A lone zero block at %s"),
                     STRINGIFY_BIGINT (current_block_ordinal (), buf)));
+             break;
            }
          status = prev_status;
          continue;
@@ -395,9 +396,13 @@ read_header (bool raw_extended_headers)
 
              *bp = '\0';
            }
-         else if (header->header.typeflag == XHDTYPE
-                  || header->header.typeflag == XGLTYPE)
+         else if (header->header.typeflag == XHDTYPE)
            xheader_read (header, OFF_FROM_HEADER (header->header.size));
+         else if (header->header.typeflag == XGLTYPE)
+           {
+             xheader_read (header, OFF_FROM_HEADER (header->header.size));
+             xheader_decode_global ();
+           }
       
          /* Loop!  */
 
@@ -559,7 +564,8 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
        {
        case BLKTYPE:
        case CHRTYPE:
-         stat_info->stat.st_rdev = makedev (stat_info->devmajor, stat_info->devminor);
+         stat_info->stat.st_rdev = makedev (stat_info->devmajor,
+                                            stat_info->devminor);
          break;
 
        default:
@@ -567,9 +573,8 @@ decode_header (union block *header, struct tar_stat_info *stat_info,
        }
     }
 
+  xheader_decode (stat_info);
   current_stat_info.archive_file_size = current_stat_info.stat.st_size;
-  if (extended_header.size)
-    xheader_decode (stat_info);
 }
 
 /* Convert buffer at WHERE0 of size DIGS from external format to
@@ -896,7 +901,7 @@ tartime (time_t t)
 #else
   /* Use ISO 8610 format.  See:
      http://www.cl.cam.ac.uk/~mgk25/iso-time.html  */
-  struct tm *tm = localtime (&t);
+  struct tm *tm = utc_option ? gmtime (&t) : localtime (&t);
   if (tm)
     {
       sprintf (buffer, "%04ld-%02d-%02d %02d:%02d:%02d",
This page took 0.021804 seconds and 4 git commands to generate.