Merge pull request #40473 from nextcloud/backport/39860/stable27

[stable27] don't preload metadata for the sub-childen
This commit is contained in:
Robin Appelman 2023-09-18 13:53:18 +02:00 committed by GitHub
commit 2fad5233a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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