sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 201e71be2b4ed0edaba2e45f5825ff5b5974d270
parent 7a0d9fb3eaa85f8dec5ba5e3bd6ecee681ab2816
Author: sin <sin@2f30.org>
Date:   Thu, 23 Apr 2015 00:04:55 +0100

tar: Skip over git's global pax header crap

Diffstat:
Mtar.c | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/tar.c b/tar.c @@ -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))