Merge pull request #54956 from nextcloud/backport/54951/stable32

[stable32] fix: calculate node limit using MiB instead of MB
This commit is contained in:
Andy Scherzinger 2025-09-09 08:56:40 +02:00 committed by GitHub
commit 6908454e5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -98,7 +98,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;
}