Skip to content

Commit

Permalink
watchfulli#2 issue fix, fixing directory size to zero in TAR class
Browse files Browse the repository at this point in the history
  • Loading branch information
ovidiul committed Mar 1, 2017
1 parent 6f13934 commit 9851d8f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vendor/splitbrain/php-archive/src/Tar.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,12 +585,18 @@ function skipbytes($bytes)
*/
protected function writeFileHeader(FileInfo $fileinfo)
{
if($fileinfo->getIsdir())
$size = 0;
else
$size = $fileinfo->getSize();

$this->writeRawFileHeader(
$fileinfo->getPath(),
$fileinfo->getUid(),
$fileinfo->getGid(),
$fileinfo->getMode(),
$fileinfo->getSize(),
//$fileinfo->getSize(),
$size,
$fileinfo->getMtime(),
$fileinfo->getIsdir() ? '5' : '0'
);
Expand Down

0 comments on commit 9851d8f

Please sign in to comment.