diff options
author | Robin Appelman <robin@icewind.nl> | 2023-08-16 17:14:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-16 17:14:07 +0200 |
commit | 6f6e24431a304eda38d2bfc529a7259c1c11fed3 (patch) | |
tree | 39f7233136acf0b2185f39805641615da0f2f770 /apps/dav | |
parent | 12805eeaf302fa23e886f1b3fd519365016dcfcb (diff) | |
parent | 76acc3ada729127c3d7eb50f03bcb2a0a56dac66 (diff) | |
download | nextcloud-server-6f6e24431a304eda38d2bfc529a7259c1c11fed3.tar.gz nextcloud-server-6f6e24431a304eda38d2bfc529a7259c1c11fed3.zip |
Merge pull request #39860 from nextcloud/metadata-dont-preload-subfolders
don't preload metadata for the sub-childen
Diffstat (limited to 'apps/dav')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index ae3caa29b91..709a4cd68ed 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -465,13 +465,17 @@ class FilesPlugin extends ServerPlugin { $requestProperties = $propFind->getRequestedProperties(); - if ($this->config->getSystemValueBool('enable_file_metadata', true)) { - $requestedMetaData = []; - foreach ($requestProperties as $requestProperty) { - if (isset(self::ALL_METADATA_PROPS[$requestProperty])) { - $requestedMetaData[] = self::ALL_METADATA_PROPS[$requestProperty]; - } + $requestedMetaData = []; + foreach ($requestProperties as $requestProperty) { + if (isset(self::ALL_METADATA_PROPS[$requestProperty])) { + $requestedMetaData[] = self::ALL_METADATA_PROPS[$requestProperty]; } + } + if ( + $this->config->getSystemValueBool('enable_file_metadata', true) && + $propFind->getDepth() === 1 && + $requestedMetaData + ) { $children = $node->getChildren(); // Preloading of the metadata |