aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2023-01-30 10:07:01 +0100
committerRichard Steinmetz <richard@steinmetz.cloud>2023-01-30 10:07:01 +0100
commitf0a3b77d0ffd96fc07a713482410c80e1994926a (patch)
tree111d27fe79c8911d0a6fe6d7afe6fac036bcf332 /lib
parentde415fbb15d6c5cceca7b05261947d573a7a512c (diff)
downloadnextcloud-server-f0a3b77d0ffd96fc07a713482410c80e1994926a.tar.gz
nextcloud-server-f0a3b77d0ffd96fc07a713482410c80e1994926a.zip
fix(encryption): don't throw on missing file
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
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) {