From: Thomas Müller Date: Tue, 14 Apr 2015 10:27:12 +0000 (+0200) Subject: preserve filesize on rename after upload X-Git-Tag: v8.1.0alpha1~14^2~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=387984a0d5fbe4ba2859300dc525df9b87917281;p=nextcloud-server.git preserve filesize on rename after upload --- diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index 4136e008af9..47a31e794e8 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -181,6 +181,9 @@ class Encryption extends Wrapper { $result = $this->storage->rename($path1, $path2); if ($result) { $target = $this->getFullPath($path2); + if (isset($this->unencryptedSize[$source])) { + $this->unencryptedSize[$target] = $this->unencryptedSize[$source]; + } $encryptionModule = $this->getEncryptionModule($path2); if ($encryptionModule) { $keyStorage = $this->getKeyStorage($encryptionModule->getId());