From 387984a0d5fbe4ba2859300dc525df9b87917281 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20M=C3=BCller?= Date: Tue, 14 Apr 2015 12:27:12 +0200 Subject: [PATCH] preserve filesize on rename after upload --- lib/private/files/storage/wrapper/encryption.php | 3 +++ 1 file changed, 3 insertions(+) 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()); -- 2.39.5