diff --git a/apps/files_trashbin/lib/Sabre/ITrash.php b/apps/files_trashbin/lib/Sabre/ITrash.php index 7ec27f7885..43e59e03bc 100644 --- a/apps/files_trashbin/lib/Sabre/ITrash.php +++ b/apps/files_trashbin/lib/Sabre/ITrash.php @@ -31,4 +31,6 @@ interface ITrash { public function getOriginalLocation(): string; public function getDeletionTime(): int; + + public function getSize(); } diff --git a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php index a0aaa552a1..078f85da8f 100644 --- a/apps/files_trashbin/lib/Sabre/PropfindPlugin.php +++ b/apps/files_trashbin/lib/Sabre/PropfindPlugin.php @@ -24,6 +24,7 @@ declare(strict_types=1); namespace OCA\Files_Trashbin\Sabre; +use OCA\DAV\Connector\Sabre\FilesPlugin; use Sabre\DAV\INode; use Sabre\DAV\PropFind; use Sabre\DAV\Server; @@ -64,6 +65,10 @@ class PropfindPlugin extends ServerPlugin { $propFind->handle(self::TRASHBIN_DELETION_TIME, function () use ($node) { return $node->getDeletionTime(); }); + + $propFind->handle(FilesPlugin::SIZE_PROPERTYNAME, function () use ($node) { + return $node->getSize(); + }); } } diff --git a/apps/files_trashbin/lib/Sabre/TrashFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolder.php index e1fd965487..76ccb2b0df 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolder.php @@ -120,4 +120,7 @@ class TrashFolder implements ICollection, ITrash { return $this->getLastModified(); } + public function getSize(): int { + return $this->data->getSize(); + } } diff --git a/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php b/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php index 3c2c413809..de0725ab92 100644 --- a/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php +++ b/apps/files_trashbin/lib/Sabre/TrashFolderFolder.php @@ -132,4 +132,8 @@ class TrashFolderFolder implements ICollection, ITrash { public function getDeletionTime(): int { return $this->getLastModified(); } + + public function getSize(): int { + return $this->data->getSize(); + } }