Skip to content

Commit

Permalink
ObjectStore: really move object if source and target are on different…
Browse files Browse the repository at this point in the history
… buckets
  • Loading branch information
DeepDiver1975 committed Nov 9, 2018
1 parent df6e8ef commit 0c87fb5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ public function moveFromStorage(\OCP\Files\Storage $sourceStorage, $sourceIntern
return parent::moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
}

// living on different buckets?
if ($this->getId() !== $sourceStorage->getId()) {
return parent::moveFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
}

// source and target live on the same object store and we can simply rename
// which updates the cache properly
$this->getUpdater()->renameFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath);
Expand Down

0 comments on commit 0c87fb5

Please sign in to comment.