mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 23:03:00 -04:00
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:
parent
29d72bfb32
commit
05d5fdb429
1 changed files with 2 additions and 2 deletions
|
|
@ -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}"',
|
||||
|
|
|
|||
Loading…
Reference in a new issue