diff --git a/lib/Mount/GroupFolderStorage.php b/lib/Mount/GroupFolderStorage.php index 36c0df4bb..9ac86585e 100644 --- a/lib/Mount/GroupFolderStorage.php +++ b/lib/Mount/GroupFolderStorage.php @@ -11,6 +11,7 @@ use OC\Files\ObjectStore\ObjectStoreStorage; use OC\Files\Storage\Wrapper\Quota; use OCP\Files\Cache\ICacheEntry; +use OCP\Files\Storage\IStorage; use OCP\IUser; use OCP\IUserSession; @@ -69,4 +70,14 @@ public function getScanner($path = '', $storage = null) { } return $storage->scanner; } + + public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) { + if ($sourceStorage->instanceOfStorage(ObjectStoreStorage::class) && + $this->instanceOfStorage(ObjectStoreStorage::class) && + $sourceStorage->getObjectStore()->getStorageId() === $this->getObjectStore()->getStorageId()) { + // Do not import any data when source and target object storages are identical. + return true; + } + return parent::moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath); + } }