diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 5bc4ee8529d76..6483e46da2074 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -68,6 +68,14 @@ protected function getSourcePath(string $path) { } } + protected function getUnjailedSourcePath(string $path): string { + if ($path === '') { + return $this->getGetUnjailedRoot(); + } else { + return $this->getGetUnjailedRoot() . '/' . ltrim($path, '/'); + } + } + /** * @param string $path * @param null|string $root @@ -189,7 +197,7 @@ public function move($source, $target) { * @return array [$storageId, $internalPath] */ protected function getMoveInfo($path) { - return [$this->getNumericStorageId(), $this->getSourcePath($path)]; + return [$this->getNumericStorageId(), $this->getUnjailedSourcePath($path)]; } /** diff --git a/lib/private/Files/Cache/Wrapper/CacheWrapper.php b/lib/private/Files/Cache/Wrapper/CacheWrapper.php index 8d48fd2ddaa90..0cb93cca010fa 100644 --- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php +++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php @@ -201,7 +201,7 @@ public function move($source, $target) { } protected function getMoveInfo($path) { - /** @var Cache $cache */ + /** @var Cache|CacheJail $cache */ $cache = $this->getCache(); return $cache->getMoveInfo($path); }