summaryrefslogtreecommitdiffstats
path: root/lib/private/files/storage/wrapper/wrapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/storage/wrapper/wrapper.php')
-rw-r--r--lib/private/files/storage/wrapper/wrapper.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/files/storage/wrapper/wrapper.php b/lib/private/files/storage/wrapper/wrapper.php
index f3dc09db138..14024addec4 100644
--- a/lib/private/files/storage/wrapper/wrapper.php
+++ b/lib/private/files/storage/wrapper/wrapper.php
@@ -513,6 +513,10 @@ class Wrapper implements \OC\Files\Storage\Storage {
* @return bool
*/
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ if ($sourceStorage === $this) {
+ return $this->copy($sourceInternalPath, $targetInternalPath);
+ }
+
return $this->storage->copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
}
@@ -523,6 +527,10 @@ class Wrapper implements \OC\Files\Storage\Storage {
* @return bool
*/
public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ if ($sourceStorage === $this) {
+ return $this->rename($sourceInternalPath, $targetInternalPath);
+ }
+
return $this->storage->moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
}