diff --git a/cypress/e2e/propfind.spec.js b/cypress/e2e/propfind.spec.js index 7b53b9308bf..04a83d6a303 100644 --- a/cypress/e2e/propfind.spec.js +++ b/cypress/e2e/propfind.spec.js @@ -40,8 +40,7 @@ describe('Text PROPFIND extension ', function() { .should('have.property', richWorkspace, '') }) - // Android app relies on this when navigating nested folders - it('adds rich workspace property to nested folders', function() { + it('never adds rich workspace property to nested folders', function() { cy.createFolder('/workspace') // FIXME: Ideally we do not need a page context for those tests at all // For now the dashboard avoids that we have failing requests due to conflicts when updating the file @@ -52,9 +51,8 @@ describe('Text PROPFIND extension ', function() { cy.uploadFile('test.md', 'text/markdown', '/workspace/Readme.md') cy.propfindFolder('/', 1) .then(results => results.pop().propStat[0].properties) - .should('have.property', richWorkspace, '## Hello world\n') + .should('not.have.property', richWorkspace) }) - }) describe('with workspaces disabled', function() { diff --git a/lib/DAV/WorkspacePlugin.php b/lib/DAV/WorkspacePlugin.php index 6f68aa8c5e1..79158947959 100644 --- a/lib/DAV/WorkspacePlugin.php +++ b/lib/DAV/WorkspacePlugin.php @@ -76,6 +76,12 @@ public function propFind(PropFind $propFind, INode $node) { return; } + // Only return the property for the parent node and ignore it for further in depth nodes + // Otherwise requesting parent with description files for all the children makes a huge performance impact for external storages children + if ($propFind->getDepth() !== $this->server->getHTTPDepth()) { + return; + } + $node = $node->getNode(); try { $file = $this->workspaceService->getFile($node); @@ -83,7 +89,6 @@ public function propFind(PropFind $propFind, INode $node) { $file = null; } - // Only return the property for the parent node and ignore it for further in depth nodes $propFind->handle(self::WORKSPACE_PROPERTY, function () use ($file) { $cachedContent = ''; if ($file instanceof File) {