Skip to content

Commit aa9ae83

Browse files
committed
fix filesize calculation in GNU long link tar files
also fixes a warning on PHP 7.1
1 parent 5165533 commit aa9ae83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Tar.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ protected function parseHeader($block)
573573
// Handle Long-Link entries from GNU Tar
574574
if ($return['typeflag'] == 'L') {
575575
// following data block(s) is the filename
576-
$filename = trim($this->readbytes(ceil($header['size'] / 512) * 512));
576+
$filename = trim($this->readbytes(ceil($return['size'] / 512) * 512));
577577
// next block is the real header
578578
$block = $this->readbytes(512);
579579
$return = $this->parseHeader($block);

0 commit comments

Comments
 (0)