aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-08-14 13:01:14 +0200
committerRobin Appelman <robin@icewind.nl>2023-08-14 13:01:14 +0200
commit76acc3ada729127c3d7eb50f03bcb2a0a56dac66 (patch)
treefda138aded18576b0ca7eb52f061cfe5b2943294 /apps/dav
parentfce1a164a07a33fe2ec71d845a733191bccf59a5 (diff)
downloadnextcloud-server-76acc3ada729127c3d7eb50f03bcb2a0a56dac66.tar.gz
nextcloud-server-76acc3ada729127c3d7eb50f03bcb2a0a56dac66.zip
only triger metadata preload logic when at least one metadata is requested
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav')
-rw-r--r--apps/dav/lib/Connector/Sabre/FilesPlugin.php16
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 7d7b27df890..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) && $propFind->getDepth() === 1) {
- $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