diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2023-02-07 18:33:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 18:33:55 +0100 |
commit | e57d79961644c5d23a97958a5c80aac827e96829 (patch) | |
tree | 9c73900e3d97bb57883ea5ed8a492cbf839136a5 | |
parent | 4f7a5698b26d5f208432d85933e09d7e517ff61c (diff) | |
parent | 05aa57f98ddec81ad28ab801bdc92592538b7f04 (diff) | |
download | nextcloud-server-e57d79961644c5d23a97958a5c80aac827e96829.tar.gz nextcloud-server-e57d79961644c5d23a97958a5c80aac827e96829.zip |
Merge pull request #36442 from nextcloud/backport/36433/stable25
[stable25] fix(encryption): don't throw on missing file
-rw-r--r-- | lib/private/Files/Storage/Wrapper/Encryption.php | 5 |
1 files changed, 1 insertions, 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) { |