Silently ignore 'g' and 'x' type tar extended headers, rather than warning about
"unknown (or unsupported) file type 'x'".

It seems that base-files has an 'x' extended header for each file, apparently to
store the mtime.
---
 ChangeLog      | 5 +++++
 archive_tar.cc | 3 +++
 2 files changed, 8 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index bc47a54..75530de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2015-03-04  Jon TURNEY  <jon.tur...@dronecode.org.uk>
 
+       * archive_tar.cc (next_file_name): Silence error for 'g' and 'x'
+       type headers.
+
+2015-03-04  Jon TURNEY  <jon.tur...@dronecode.org.uk>
+
        * archive_tar.cc (archive_tar): Convert from fprintf(stderr, ...)
        to LogBabblePrintf() or LogPlainPrintf() as appropriate.
 
diff --git a/archive_tar.cc b/archive_tar.cc
index e81efeb..131591d 100644
--- a/archive_tar.cc
+++ b/archive_tar.cc
@@ -229,6 +229,9 @@ archive_tar::next_file_name ()
       LogPlainPrintf ("error: unknown (or unsupported) file type `%c'\n",
                       state.tar_header.typeflag);
       err++;
+      /* fall through */
+    case 'g':                  /* POSIX.1-2001 global extended header */
+    case 'x':                  /* POSIX.1-2001 extended header */
       skip_file ();
       return next_file_name ();
     }
-- 
2.1.4

Reply via email to