aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-01-30 15:40:25 +0100
committerGitHub <noreply@github.com>2023-01-30 15:40:25 +0100
commit7251ed1cc35bc8fc96f99afa3baf410b8db625c5 (patch)
treeed75c706cad4445b1da0adf7ce6ad99ee8767afc /lib
parent7d337566c6ae179ea8d1c370ced9b93b263f83e2 (diff)
parentf0a3b77d0ffd96fc07a713482410c80e1994926a (diff)
downloadnextcloud-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.php5
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) {