From b1ce53f890d51aec97d2423651188e14c445c72e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 7 Sep 2015 17:19:50 +0200 Subject: [PATCH] use a normal rename when moving from the same storage in the encryption wrapper --- 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 c80e935b98..e9aabe2e5a 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