fix(trashbin): include $availableSpace = 0 in checks when we need to delete expired files

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2025-10-22 15:19:56 +02:00 committed by Louis
parent 29d72bfb32
commit 05d5fdb429

View file

@ -880,9 +880,9 @@ class Trashbin implements IEventListener {
$expiration = $application->getContainer()->query('Expiration');
$size = 0;
if ($availableSpace < 0) {
if ($availableSpace <= 0) {
foreach ($files as $file) {
if ($availableSpace < 0 && $expiration->isExpired($file['mtime'], true)) {
if ($availableSpace <= 0 && $expiration->isExpired($file['mtime'], true)) {
$tmp = self::delete($file['name'], $user, $file['mtime']);
Server::get(LoggerInterface::class)->info(
'remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota) for user "{user}"',