summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2023-01-30 10:07:01 +0100
committerblizzz (Rebase PR Action) <blizzz@users.noreply.github.com>2023-02-07 18:12:12 +0000
commit18ca00b21624d7d1ad7144c108fab91abe9c896d (patch)
tree62847464c192918762217d3901d3bf84a9efc6ed
parentdc737047ce1229a076b2e3e9ef7d1f96f74d06e6 (diff)
downloadnextcloud-server-18ca00b21624d7d1ad7144c108fab91abe9c896d.tar.gz
nextcloud-server-18ca00b21624d7d1ad7144c108fab91abe9c896d.zip
fix(encryption): don't throw on missing file
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
-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 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) {