aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-06-19 22:39:57 +0200
committerGitHub <noreply@github.com>2023-06-19 22:39:57 +0200
commitfec43fc1325b75e1c98838cd961187e7c0409984 (patch)
tree2a99837f58066a0dc9c626b3372da941125349cb /lib
parent02af883123929dc8171868ac4abc2e8e117f60d7 (diff)
parent782736ab544705557783acd0afd6bddf7415cd3a (diff)
downloadnextcloud-server-fec43fc1325b75e1c98838cd961187e7c0409984.tar.gz
nextcloud-server-fec43fc1325b75e1c98838cd961187e7c0409984.zip
Merge pull request #38891 from nextcloud/obj-store-copy-list-source-cache-27
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index 978b5b0451c..d918bd98729 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -38,6 +38,7 @@ use Icewind\Streams\IteratorDirectory;
use OC\Files\Cache\Cache;
use OC\Files\Cache\CacheEntry;
use OC\Files\Storage\PolyFill\CopyDirectory;
+use OCP\Files\Cache\ICache;
use OCP\Files\Cache\ICacheEntry;
use OCP\Files\FileInfo;
use OCP\Files\GenericFileException;
@@ -593,7 +594,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
if (is_array($sourceEntryData) && array_key_exists('scan_permissions', $sourceEntryData)) {
$sourceEntry['permissions'] = $sourceEntryData['scan_permissions'];
}
- $this->copyInner($sourceEntry, $targetInternalPath);
+ $this->copyInner($sourceStorage->getCache(), $sourceEntry, $targetInternalPath);
return true;
}
}
@@ -611,12 +612,12 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
throw new NotFoundException('Source object not found');
}
- $this->copyInner($sourceEntry, $target);
+ $this->copyInner($cache, $sourceEntry, $target);
return true;
}
- private function copyInner(ICacheEntry $sourceEntry, string $to) {
+ private function copyInner(ICache $sourceCache, ICacheEntry $sourceEntry, string $to) {
$cache = $this->getCache();
if ($sourceEntry->getMimeType() === FileInfo::MIMETYPE_FOLDER) {
@@ -625,8 +626,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
}
$this->mkdir($to);
- foreach ($cache->getFolderContentsById($sourceEntry->getId()) as $child) {
- $this->copyInner($child, $to . '/' . $child->getName());
+ foreach ($sourceCache->getFolderContentsById($sourceEntry->getId()) as $child) {
+ $this->copyInner($sourceCache, $child, $to . '/' . $child->getName());
}
} else {
$this->copyFile($sourceEntry, $to);