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

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
Richard Steinmetz 2023-01-30 10:07:01 +01:00
parent de415fbb15
commit f0a3b77d0f

View file

@ -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) {