summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2015-05-05 14:38:06 +0200
committerBjoern Schiessle <schiessle@owncloud.com>2015-05-05 16:17:14 +0200
commit7089af96f297cb56fb1c3617527b31349b8341cf (patch)
treefdb0448ba274397b44a5e01154c57268b98ecd3c /lib
parent5aa3525479a29ea0521db9050d3ef22e17729e94 (diff)
downloadnextcloud-server-7089af96f297cb56fb1c3617527b31349b8341cf.tar.gz
nextcloud-server-7089af96f297cb56fb1c3617527b31349b8341cf.zip
make sure that we keep the correct encrypted-flag and the (unencrypted)size if a file gets copied
Diffstat (limited to 'lib')
-rw-r--r--lib/private/files/storage/wrapper/encryption.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index 41a7f9e9242..439dc0ab6d3 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -252,6 +252,7 @@ class Encryption extends Wrapper {
*/
public function copy($path1, $path2) {
$fullPath1 = $this->getFullPath($path1);
+ $fullPath2 = $this->getFullPath($path2);
if ($this->util->isExcluded($fullPath1)) {
return $this->storage->copy($path1, $path2);
}
@@ -267,6 +268,9 @@ class Encryption extends Wrapper {
) {
$this->update->update($target);
}
+ $data = $this->getMetaData($path1);
+ $this->getCache()->put($path2, ['encrypted' => $data['encrypted']]);
+ $this->updateUnencryptedSize($fullPath2, $data['size']);
}
return $result;