diff --git a/lib/Controller/WorkspaceController.php b/lib/Controller/WorkspaceController.php index 52ea5e843e9..7a40e91af0f 100644 --- a/lib/Controller/WorkspaceController.php +++ b/lib/Controller/WorkspaceController.php @@ -138,7 +138,7 @@ public function publicFolder(string $shareToken, string $path = '/'): DataRespon } $shareNode = $share->getNode(); - $node = $shareNode instanceof File ? $shareNode : $shareNode->get($path); + $node = $shareNode instanceof Folder ? $shareNode->get($path) : $shareNode; if ($node instanceof Folder) { $file = $this->workspaceService->getFile($node); if ($file === null) {