sbase

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

commit 86031d0026b7b15229368bbe0749952c02199e86
parent 43578242669d7f6bf7c3713d2745034acbc4b804
Author: sin <sin@2f30.org>
Date:   Thu Apr 23 00:04:55 +0100

tar: Skip over git's global pax header crap

Diffstat:
tar.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))