2
0
mirror of https://github.com/vasi/pixz synced 2024-10-30 15:21:41 +00:00

Merge pull request #77 from steini2000/master

fix decompressing files >4gb on 32bit systems
This commit is contained in:
Dave Vasilevsky 2019-07-10 00:28:19 -04:00 committed by GitHub
commit 00e62fe45a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ struct wanted_t {
wanted_t *next;
char *name;
off_t start, end;
size_t size;
off_t size;
};
static wanted_t *gWantedFiles = NULL;
@ -132,8 +132,8 @@ void pixz_read(bool verify, size_t nspecs, char **specs) {
const char *path = archive_entry_pathname(entry);
if (!lastmulti) {
if (wlast && wlast->size != off - lastoff)
die("Index and archive show differing sizes for %s: %d vs %d",
wlast->name, wlast->size, off - lastoff);
die("Index and archive show differing sizes for %s: %jd vs %jd",
wlast->name, (intmax_t)wlast->size, (intmax_t)(off - lastoff));
lastoff = off;
}
@ -635,7 +635,7 @@ static ssize_t tar_read(struct archive *ar, void *ref, const void **bufp) {
return 0;
off_t off;
size_t size;
off_t size;
io_block_t *ib = (io_block_t*)(gArItem->data);
if (gWantedFiles && gExplicitFiles) {
debug("tar want: %s", gArWanted->name);