Merge pull request #54995 from nextcloud/backport/54919/stable31

[stable31] fix: don't show object size warning if we can't determine the object size
This commit is contained in:
Richard Steinmetz 2025-09-12 14:20:51 +02:00 committed by GitHub
commit 41eee84cba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -153,7 +153,7 @@ class File extends Command {
}
$stat = fstat($fh);
fclose($fh);
if ($stat['size'] !== $node->getSize()) {
if (isset($stat['size']) && $stat['size'] !== $node->getSize()) {
$output->writeln(' <error>warning: object had a size of ' . $stat['size'] . ' but cache entry has a size of ' . $node->getSize() . '</error>. This should have been automatically repaired');
}
} catch (\Exception $e) {