|
@@ 682-685 (lines=4) @@
|
| 679 |
|
$fileUid = $file->getUid(); |
| 680 |
|
$fileInfo = $file->getStorage()->getFileInfo($file); |
| 681 |
|
$fileSize = (int)$fileInfo['size']; |
| 682 |
|
if ($fileSize !== (int)$file->getProperty('size')) { |
| 683 |
|
$this->error('File size of ' . $file->getCombinedIdentifier() . ' is not up-to-date in index! File added with current size.'); |
| 684 |
|
$this->dat['records']['sys_file:' . $fileUid]['data']['size'] = $fileSize; |
| 685 |
|
} |
| 686 |
|
$fileSha1 = $file->getStorage()->hashFile($file, 'sha1'); |
| 687 |
|
if ($fileSha1 !== $file->getProperty('sha1')) { |
| 688 |
|
$this->error('File sha1 hash of ' . $file->getCombinedIdentifier() . ' is not up-to-date in index! File added on current sha1.'); |
|
@@ 687-690 (lines=4) @@
|
| 684 |
|
$this->dat['records']['sys_file:' . $fileUid]['data']['size'] = $fileSize; |
| 685 |
|
} |
| 686 |
|
$fileSha1 = $file->getStorage()->hashFile($file, 'sha1'); |
| 687 |
|
if ($fileSha1 !== $file->getProperty('sha1')) { |
| 688 |
|
$this->error('File sha1 hash of ' . $file->getCombinedIdentifier() . ' is not up-to-date in index! File added on current sha1.'); |
| 689 |
|
$this->dat['records']['sys_file:' . $fileUid]['data']['sha1'] = $fileSha1; |
| 690 |
|
} |
| 691 |
|
|
| 692 |
|
$fileRec = []; |
| 693 |
|
$fileRec['filesize'] = $fileSize; |