diff options
Diffstat (limited to 'lib/DAV/WorkspacePlugin.php')
-rw-r--r-- | lib/DAV/WorkspacePlugin.php | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/lib/DAV/WorkspacePlugin.php b/lib/DAV/WorkspacePlugin.php index 79a8a393a..4118555c0 100644 --- a/lib/DAV/WorkspacePlugin.php +++ b/lib/DAV/WorkspacePlugin.php @@ -93,24 +93,24 @@ class WorkspacePlugin extends ServerPlugin { if (!$workspaceAvailable || !$workspaceEnabled) { return; } - - $propFind->handle(self::WORKSPACE_PROPERTY, function () use ($node) { - /** @var Folder[] $nodes */ - $nodes = $this->rootFolder->getUserFolder($this->userId)->getById($node->getId()); - if (count($nodes) > 0) { - /** @var File $file */ - try { - $file = $this->workspaceService->getFile($nodes[0]); - if ($file instanceof File) { - return $file->getContent(); - } - } catch (StorageNotAvailableException $e) { + if ($propFind->getDepth() > 0) { + $propFind->handle(self::WORKSPACE_PROPERTY, function () use ($node) { + /** @var Folder[] $nodes */ + $nodes = $this->rootFolder->getUserFolder($this->userId)->getById($node->getId()); + if (count($nodes) > 0) { + /** @var File $file */ + try { + $file = $this->workspaceService->getFile($nodes[0]); + if ($file instanceof File) { + return $file->getContent(); + } + } catch (StorageNotAvailableException $e) { // If a storage is not available we can for the propfind response assume that there is no rich workspace present + } } - } - return ''; - }); - + return ''; + }); + } } } |