Skip to content
Snippets Groups Projects
Unverified Commit ab266a77 authored by Morris Jobke's avatar Morris Jobke Committed by GitHub
Browse files

Merge pull request #9626 from lars-sh/patch-1

Workaround for interrupting expired files deletion
parents 9444a3fa 436c4f89
No related branches found
No related tags found
No related merge requests found
...@@ -790,8 +790,12 @@ class Trashbin { ...@@ -790,8 +790,12 @@ class Trashbin {
$timestamp = $file['mtime']; $timestamp = $file['mtime'];
$filename = $file['name']; $filename = $file['name'];
if ($expiration->isExpired($timestamp)) { if ($expiration->isExpired($timestamp)) {
$count++; try {
$size += self::delete($filename, $user, $timestamp); $size += self::delete($filename, $user, $timestamp);
$count++;
} catch (\OCP\Files\NotPermittedException $e) {
\OC::$server->getLogger()->logException($e, ['app' => 'files_trashbin', 'level' => \OCP\ILogger::WARN, 'message' => 'Removing "' . $filename . '" from trashbin failed.']);
}
\OC::$server->getLogger()->info( \OC::$server->getLogger()->info(
'Remove "' . $filename . '" from trashbin because it exceeds max retention obligation term.', 'Remove "' . $filename . '" from trashbin because it exceeds max retention obligation term.',
['app' => 'files_trashbin'] ['app' => 'files_trashbin']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment