summaryrefslogtreecommitdiffstats
path: root/lib/private/files
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-04-14 12:27:12 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-04-14 12:27:12 +0200
commit387984a0d5fbe4ba2859300dc525df9b87917281 (patch)
tree870c8232469f4aa1a117a8ee9cf25a7f2cda3426 /lib/private/files
parentf816acde271342ef20de612e6b6deca90dbffb67 (diff)
downloadnextcloud-server-387984a0d5fbe4ba2859300dc525df9b87917281.tar.gz
nextcloud-server-387984a0d5fbe4ba2859300dc525df9b87917281.zip
preserve filesize on rename after upload
Diffstat (limited to 'lib/private/files')
-rw-r--r--lib/private/files/storage/wrapper/encryption.php3
1 files changed, 3 insertions, 0 deletions
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());