Merge pull request #19297 from nextcloud/backport/19246/stable18

[stable18] Keep the modification time during decryptFile
This commit is contained in:
Roeland Jago Douma 2020-02-05 07:39:14 +01:00 committed by GitHub
commit 062d9dadcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -266,6 +266,7 @@ class DecryptAll {
try { try {
$this->rootView->copy($source, $target); $this->rootView->copy($source, $target);
$this->rootView->touch($target, $fileInfo->getMTime());
$this->rootView->rename($target, $source); $this->rootView->rename($target, $source);
} catch (DecryptionFailedException $e) { } catch (DecryptionFailedException $e) {
if ($this->rootView->file_exists($target)) { if ($this->rootView->file_exists($target)) {