This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
[PATCH setup 4/4] Silently ignore 'x' and 'g' type tar extended headers
- From: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- To: cygwin-apps at cygwin dot com
- Cc: Jon TURNEY <jon dot turney at dronecode dot org dot uk>
- Date: Thu, 5 Mar 2015 13:44:37 +0000
- Subject: [PATCH setup 4/4] Silently ignore 'x' and 'g' type tar extended headers
- Authentication-results: sourceware.org; auth=none
- References: <1425563077-1328-1-git-send-email-jon dot turney at dronecode dot org dot uk>
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.turney@dronecode.org.uk>
+ * archive_tar.cc (next_file_name): Silence error for 'g' and 'x'
+ type headers.
+
+2015-03-04 Jon TURNEY <jon.turney@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