fix(encryption): don't throw on missing file

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
pull/36433/head
Richard Steinmetz 2 years ago
parent de415fbb15
commit f0a3b77d0f
  1. 5
      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) {

Loading…
Cancel
Save