mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Store size in int|float for 32bit support
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
f75891de5d
commit
5090848b25
2 changed files with 7 additions and 4 deletions
|
|
@ -385,10 +385,10 @@ class Scanner extends BasicEmitter implements IScanner {
|
|||
* @param int $reuse a combination of self::REUSE_*
|
||||
* @param int $folderId id for the folder to be scanned
|
||||
* @param bool $lock set to false to disable getting an additional read lock during scanning
|
||||
* @param int $oldSize the size of the folder before (re)scanning the children
|
||||
* @param int|float $oldSize the size of the folder before (re)scanning the children
|
||||
* @return int|float the size of the scanned folder or -1 if the size is unknown at this stage
|
||||
*/
|
||||
protected function scanChildren(string $path, $recursive, int $reuse, int $folderId, bool $lock, int $oldSize) {
|
||||
protected function scanChildren(string $path, $recursive, int $reuse, int $folderId, bool $lock, int|float $oldSize) {
|
||||
if ($reuse === -1) {
|
||||
$reuse = ($recursive === self::SCAN_SHALLOW) ? self::REUSE_ETAG | self::REUSE_SIZE : self::REUSE_ETAG;
|
||||
}
|
||||
|
|
@ -418,7 +418,10 @@ class Scanner extends BasicEmitter implements IScanner {
|
|||
return $size;
|
||||
}
|
||||
|
||||
private function handleChildren($path, $recursive, $reuse, $folderId, $lock, &$size) {
|
||||
/**
|
||||
* @param bool|IScanner::SCAN_RECURSIVE_INCOMPLETE $recursive
|
||||
*/
|
||||
private function handleChildren(string $path, $recursive, int $reuse, int $folderId, bool $lock, int|float &$size): array {
|
||||
// we put this in it's own function so it cleans up the memory before we start recursing
|
||||
$existingChildren = $this->getExistingChildren($folderId);
|
||||
$newChildren = iterator_to_array($this->storage->getDirectoryContent($path));
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class ObjectStoreScanner extends Scanner {
|
|||
return [];
|
||||
}
|
||||
|
||||
protected function scanChildren(string $path, $recursive, int $reuse, int $folderId, bool $lock, int $oldSize) {
|
||||
protected function scanChildren(string $path, $recursive, int $reuse, int $folderId, bool $lock, int|float $oldSize) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue