Merge pull request #39860 from nextcloud/metadata-dont-preload-subfolders

don't preload metadata for the sub-childen
pull/39916/head
Robin Appelman 2023-08-16 17:14:07 +07:00 committed by GitHub
commit 6f6e24431a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 6 deletions

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