view sources/patches/busybox-fixtar.patch @ 243:be703e9510bb

Added tag 0.3.0 for changeset c3d2fd8b45cf
author Rob Landley <rob@landley.net>
date Fri, 02 Nov 2007 02:19:32 -0500
parents 11e99cacb09e
children
line wrap: on
line source

--- busybox-1.2.2/archival/libunarchive/get_header_tar.c	2006-07-28 17:53:44.000000000 -0500
+++ busybox-new/archival/libunarchive/get_header_tar.c	2007-09-17 21:50:44.000000000 -0500
@@ -51,6 +51,7 @@
 	long sum = 0;
 	long i;
 	static int end = 0;
+	int skippy = 0;
 
 	/* Align header */
 	data_align(archive_handle, 512);
@@ -183,10 +184,12 @@
 	case 'N':	/* Old GNU for names > 100 characters */
 	case 'S':	/* Sparse file */
 	case 'V':	/* Volume header */
+		bb_error_msg("Ignoring extension type %c", tar.formated.typeflag);
+		break;
 #endif
 	case 'g':	/* pax global header */
 	case 'x':	/* pax extended header */
-		bb_error_msg("Ignoring extension type %c", tar.formated.typeflag);
+		skippy = 1;
 		break;
 	default:
 		bb_error_msg("Unknown typeflag: 0x%x", tar.formated.typeflag);
@@ -199,7 +202,7 @@
 		}
 	}
 
-	if (archive_handle->filter(archive_handle) == EXIT_SUCCESS) {
+	if (!skippy && archive_handle->filter(archive_handle) == EXIT_SUCCESS) {
 		archive_handle->action_header(archive_handle->file_header);
 		archive_handle->flags |= ARCHIVE_EXTRACT_QUIET;
 		archive_handle->action_data(archive_handle);