From 18ca00b21624d7d1ad7144c108fab91abe9c896d Mon Sep 17 00:00:00 2001 From: Richard Steinmetz <richard@steinmetz.cloud> Date: Mon, 30 Jan 2023 10:07:01 +0100 Subject: [PATCH] fix(encryption): don't throw on missing file Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud> --- lib/private/Files/Storage/Wrapper/Encryption.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php index d5bf929101f..ec94dcdf88a 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -817,16 +817,13 @@ class Encryption extends Wrapper { $source = $sourceStorage->fopen($sourceInternalPath, 'r'); $target = $this->fopen($targetInternalPath, 'w'); [, $result] = \OC_Helper::streamCopy($source, $target); - fclose($source); - fclose($target); - } catch (\Exception $e) { + } finally { if (is_resource($source)) { fclose($source); } if (is_resource($target)) { fclose($target); } - throw $e; } if ($result) { if ($preserveMtime) { -- GitLab