Merge pull request #54966 from nextcloud/backport/54951/stable30

[stable30] fix: calculate node limit using MiB instead of MB
This commit is contained in:
Andy Scherzinger 2025-09-11 21:35:36 +02:00 committed by GitHub
commit decaa9acf4
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;
}