Merge pull request #54955 from nextcloud/backport/54951/stable31

[stable31] fix: calculate node limit using MiB instead of MB
This commit is contained in:
Richard Steinmetz 2025-09-12 12:08:13 +02:00 committed by GitHub
commit cc2ed08de9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -97,7 +97,8 @@ class GenerateMetadataJob extends TimedJob {
// Files are loaded in memory so very big files can lead to an OOM on the server
$nodeSize = $node->getSize();
$nodeLimit = $this->config->getSystemValueInt('metadata_max_filesize', self::DEFAULT_MAX_FILESIZE);
if ($nodeSize > $nodeLimit * 1000000) {
$nodeLimitMib = $nodeLimit * 1024 * 1024;
if ($nodeSize > $nodeLimitMib) {
$this->logger->debug('Skipping generating metadata for fileid ' . $node->getId() . " as its size exceeds configured 'metadata_max_filesize'.");
continue;
}