Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 15 additions & 5 deletions apps/files_trashbin/lib/Trashbin.php
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,13 @@ protected static function deleteFiles(array $files, string $user, int|float $ava
foreach ($files as $file) {
if ($availableSpace < 0 && $expiration->isExpired($file['mtime'], true)) {
$tmp = self::delete($file['name'], $user, $file['mtime']);
\OC::$server->get(LoggerInterface::class)->info('remove "' . $file['name'] . '" (' . $tmp . 'B) to meet the limit of trash bin size (50% of available quota)', ['app' => 'files_trashbin']);
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}"',
[
'app' => 'files_trashbin',
'user' => $user,
]
);
$availableSpace += $tmp;
$size += $tmp;
} else {
Expand Down Expand Up @@ -907,16 +913,20 @@ public static function deleteExpiredFiles($files, $user) {
$size += self::delete($filename, $user, $timestamp);
$count++;
} catch (NotPermittedException $e) {
\OC::$server->get(LoggerInterface::class)->warning('Removing "' . $filename . '" from trashbin failed.',
Server::get(LoggerInterface::class)->warning('Removing "' . $filename . '" from trashbin failed for user "{user}"',
[
'exception' => $e,
'app' => 'files_trashbin',
'user' => $user,
]
);
}
\OC::$server->get(LoggerInterface::class)->info(
'Remove "' . $filename . '" from trashbin because it exceeds max retention obligation term.',
['app' => 'files_trashbin']
Server::get(LoggerInterface::class)->info(
'Remove "' . $filename . '" from trashbin for user "{user}" because it exceeds max retention obligation term.',
[
'app' => 'files_trashbin',
'user' => $user,
],
);
} else {
break;
Expand Down
Loading