diff options
author | blizzz <blizzz@arthur-schiwon.de> | 2023-02-09 13:07:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-09 13:07:18 +0100 |
commit | 4d0a68eca1e129a05029c523eea1acb593c7fe1a (patch) | |
tree | a63021263714cae4cff30d0b7a07ffa6bceebdc6 | |
parent | 53c94353ff55e4f6251cb5407e28069411fa3058 (diff) | |
parent | 18ca00b21624d7d1ad7144c108fab91abe9c896d (diff) | |
download | nextcloud-server-4d0a68eca1e129a05029c523eea1acb593c7fe1a.tar.gz nextcloud-server-4d0a68eca1e129a05029c523eea1acb593c7fe1a.zip |
Merge pull request #36441 from nextcloud/backport/36433/stable24
[stable24] 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) { |