Merge pull request #36433 from nextcloud/fix/32818/decrypt-missing-file-fails

fix(encryption): don't throw on missing file
pull/36440/head
Robin Appelman 1 year ago committed by GitHub
commit 7251ed1cc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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