summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/files_trashbin/lib/Sabre/ITrash.php2
-rw-r--r--apps/files_trashbin/lib/Sabre/PropfindPlugin.php5
-rw-r--r--apps/files_trashbin/lib/Sabre/TrashFolder.php3
-rw-r--r--apps/files_trashbin/lib/Sabre/TrashFolderFolder.php4
4 files changed, 14 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/Sabre/ITrash.php b/apps/files_trashbin/lib/Sabre/ITrash.php
index 7ec27f78859..43e59e03bcf 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 a0aaa552a14..078f85da8f8 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 e1fd965487b..76ccb2b0df0 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 3c2c4138095..de0725ab92f 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();
+ }
}