]> source.dussan.org Git - nextcloud-server.git/commitdiff
preserve filesize on rename after upload
authorThomas Müller <thomas.mueller@tmit.eu>
Tue, 14 Apr 2015 10:27:12 +0000 (12:27 +0200)
committerThomas Müller <thomas.mueller@tmit.eu>
Tue, 14 Apr 2015 10:27:12 +0000 (12:27 +0200)
lib/private/files/storage/wrapper/encryption.php

index 4136e008af95f8f4b9c3e16149a60600cccf41f4..47a31e794e87dc0a062fd0c29b8b6ad98516c9d9 100644 (file)
@@ -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());