tar: Skip over git's global pax header crap

This commit is contained in:
sin 2015-04-23 00:04:55 +01:00
parent 7a0d9fb3ea
commit 201e71be2b
1 changed files with 8 additions and 0 deletions

8
tar.c
View File

@ -339,6 +339,14 @@ xt(int argc, char *argv[], int (*fn)(char *, ssize_t, char[BLKSIZ]))
}
}
/* ignore global pax header craziness */
if (h->type == 'g') {
for (; size > 0; size -= BLKSIZ)
if (fread(b, BLKSIZ, 1, tarfile) != 1)
eprintf("fread %s:", tarfilename);
continue;
}
fn(fname, size, b);
}
if (ferror(tarfile))