summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Steinmetz <richard@steinmetz.cloud>2023-01-30 10:07:01 +0100
committerbackportbot-nextcloud[bot] <backportbot-nextcloud[bot]@users.noreply.github.com>2023-01-30 15:49:53 +0000
commit05aa57f98ddec81ad28ab801bdc92592538b7f04 (patch)
treec56ffaef02d66860e0363103a6ca8850f71c9146
parent4bd771f1951d4108daeb0715446ae8eee66e5183 (diff)
downloadnextcloud-server-05aa57f98ddec81ad28ab801bdc92592538b7f04.tar.gz
nextcloud-server-05aa57f98ddec81ad28ab801bdc92592538b7f04.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) {