From d609730d84b8511978ed4676dc45c784a495879c Mon Sep 17 00:00:00 2001 From: "Grigorii K. Shartsev" Date: Thu, 27 Jun 2024 15:55:04 +0200 Subject: [PATCH] perf(rich_workspace): only add property for parent Signed-off-by: Grigorii K. Shartsev --- lib/DAV/WorkspacePlugin.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/DAV/WorkspacePlugin.php b/lib/DAV/WorkspacePlugin.php index 2967833f688..6ef502144ec 100644 --- a/lib/DAV/WorkspacePlugin.php +++ b/lib/DAV/WorkspacePlugin.php @@ -100,6 +100,11 @@ public function propFind(PropFind $propFind, INode $node) { return; } + // Only return the property for the parent node and ignore it for further in depth nodes + if ($propFind->getDepth() !== $this->server->getHTTPDepth()) { + return; + } + $file = null; $owner = $this->userId ?? $node->getFileInfo()->getStorage()->getOwner(''); /** @var Folder[] $nodes */ @@ -113,7 +118,6 @@ public function propFind(PropFind $propFind, INode $node) { } } - // Only return the property for the parent node and ignore it for further in depth nodes $propFind->handle(self::WORKSPACE_PROPERTY, function () use ($file) { if ($file instanceof File) { return $file->getContent();