diff options
author | Robin Appelman <robin@icewind.nl> | 2023-01-30 15:40:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-30 15:40:25 +0100 |
commit | 7251ed1cc35bc8fc96f99afa3baf410b8db625c5 (patch) | |
tree | ed75c706cad4445b1da0adf7ce6ad99ee8767afc /lib | |
parent | 7d337566c6ae179ea8d1c370ced9b93b263f83e2 (diff) | |
parent | f0a3b77d0ffd96fc07a713482410c80e1994926a (diff) | |
download | nextcloud-server-7251ed1cc35bc8fc96f99afa3baf410b8db625c5.tar.gz nextcloud-server-7251ed1cc35bc8fc96f99afa3baf410b8db625c5.zip |
Merge pull request #36433 from nextcloud/fix/32818/decrypt-missing-file-fails
fix(encryption): don't throw on missing file
Diffstat (limited to 'lib')
-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 be0db3d414a..0bd799507ff 100644 --- a/lib/private/Files/Storage/Wrapper/Encryption.php +++ b/lib/private/Files/Storage/Wrapper/Encryption.php @@ -819,16 +819,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) { |