Skip to content

Commit

Permalink
fixup! fix: add a try and catch for delete versioning
Browse files Browse the repository at this point in the history
Signed-off-by: greta <gretadoci@gmail.com>
  • Loading branch information
GretaD committed Jul 25, 2024
1 parent ca68a93 commit 66f7400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_versions/lib/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ public static function expireOlderThanMaxForUser($uid) {
$version->delete();
\OC_Hook::emit('\OCP\Versions', 'delete', ['path' => $internalPath, 'trigger' => self::DELETE_TRIGGER_RETENTION_CONSTRAINT]);
} catch (NotPermittedException $e) {
\OC::$server->get(LoggerInterface::class)->error("Error deleting version: File ID {$internalPath}");
\OCP\Server::get(LoggerInterface::class)->error("Missing permissions to delete version: {$internalPath}", ['app' => 'files_versions', 'exception' => $e]);
}
}
}
Expand Down

0 comments on commit 66f7400

Please sign in to comment.