summaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php3
-rw-r--r--apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php2
2 files changed, 3 insertions, 2 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
index 54d91db5c06..5e401b88481 100644
--- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php
+++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php
@@ -328,6 +328,9 @@ class FilesPlugin extends ServerPlugin {
$propFind->handle(self::HAS_PREVIEW_PROPERTYNAME, function () use ($node) {
return json_encode($this->previewManager->isAvailable($node->getFileInfo()));
});
+ $propFind->handle(self::SIZE_PROPERTYNAME, function() use ($node) {
+ return $node->getSize();
+ });
}
if ($node instanceof \OCA\DAV\Connector\Sabre\Node) {
diff --git a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
index c6e833033d5..1c9ebdd09b6 100644
--- a/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
+++ b/apps/dav/tests/unit/Connector/Sabre/FilesPluginTest.php
@@ -188,8 +188,6 @@ class FilesPluginTest extends TestCase {
$node->expects($this->exactly(2))
->method('getOwner')
->will($this->returnValue($user));
- $node->expects($this->never())
- ->method('getSize');
$this->plugin->handleGetProperties(
$propFind,