aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2024-10-29 11:33:12 +0100
committerGitHub <noreply@github.com>2024-10-29 11:33:12 +0100
commite3e22e28c08c71df44897d2f45475f2069b90ea8 (patch)
tree4fd1012aea7093c3799cb8efc515ae99b0e9d3fb /lib
parent73fdf2c150248bf6a560c82ee380258c6e916e11 (diff)
parent7cb07bf3065aaa4204b972f68d95b8d05991a963 (diff)
downloadnextcloud-server-e3e22e28c08c71df44897d2f45475f2069b90ea8.tar.gz
nextcloud-server-e3e22e28c08c71df44897d2f45475f2069b90ea8.zip
Merge pull request #47847 from nextcloud/fix-copying-or-moving-from-shared-groupfolders
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Local.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php
index 0b0272ce717..6f645c74c11 100644
--- a/lib/private/Files/Storage/Local.php
+++ b/lib/private/Files/Storage/Local.php
@@ -538,11 +538,13 @@ class Local extends \OC\Files\Storage\Common {
public function copyFromStorage(IStorage $sourceStorage, string $sourceInternalPath, string $targetInternalPath, bool $preserveMtime = false): bool {
if ($this->canDoCrossStorageMove($sourceStorage)) {
- if ($sourceStorage->instanceOfStorage(Jail::class)) {
+ // resolve any jailed paths
+ while ($sourceStorage->instanceOfStorage(Jail::class)) {
/**
* @var \OC\Files\Storage\Wrapper\Jail $sourceStorage
*/
$sourceInternalPath = $sourceStorage->getUnjailedPath($sourceInternalPath);
+ $sourceStorage = $sourceStorage->getUnjailedStorage();
}
/**
* @var \OC\Files\Storage\Local $sourceStorage
@@ -556,11 +558,13 @@ class Local extends \OC\Files\Storage\Common {
public function moveFromStorage(IStorage $sourceStorage, string $sourceInternalPath, string $targetInternalPath): bool {
if ($this->canDoCrossStorageMove($sourceStorage)) {
- if ($sourceStorage->instanceOfStorage(Jail::class)) {
+ // resolve any jailed paths
+ while ($sourceStorage->instanceOfStorage(Jail::class)) {
/**
* @var \OC\Files\Storage\Wrapper\Jail $sourceStorage
*/
$sourceInternalPath = $sourceStorage->getUnjailedPath($sourceInternalPath);
+ $sourceStorage = $sourceStorage->getUnjailedStorage();
}
/**
* @var \OC\Files\Storage\Local $sourceStorage