summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-10-05 22:02:33 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-05 22:02:33 +0200
commit0577eed14e5c4be25afd541c71c2b75b4ad5f9c7 (patch)
treee95389b5f01ebc838bb3b7cef73d85f89ef6bec8 /lib
parentea72d9061758c21ec735c2fc1dcc73320854f38d (diff)
parentb1ce53f890d51aec97d2423651188e14c445c72e (diff)
downloadnextcloud-server-0577eed14e5c4be25afd541c71c2b75b4ad5f9c7.tar.gz
nextcloud-server-0577eed14e5c4be25afd541c71c2b75b4ad5f9c7.zip
Merge pull request #18883 from owncloud/encryption-move-same-storage
use a normal rename when moving from the same storage in the encryption wrapper
Diffstat (limited to 'lib')
-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 c80e935b982..e9aabe2e5a2 100644
--- a/lib/private/files/storage/wrapper/encryption.php
+++ b/lib/private/files/storage/wrapper/encryption.php
@@ -424,6 +424,9 @@ class Encryption extends Wrapper {
* @return bool
*/
public function moveFromStorage(Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = true) {
+ if ($sourceStorage === $this) {
+ return $this->rename($sourceInternalPath, $targetInternalPath);
+ }
// TODO clean this up once the underlying moveFromStorage in OC\Files\Storage\Wrapper\Common is fixed:
// - call $this->storage->moveFromStorage() instead of $this->copyBetweenStorage