diff --git a/lib/private/Files/Cache/Wrapper/CacheJail.php b/lib/private/Files/Cache/Wrapper/CacheJail.php index 5bc4ee8529d..6483e46da20 100644 --- a/lib/private/Files/Cache/Wrapper/CacheJail.php +++ b/lib/private/Files/Cache/Wrapper/CacheJail.php @@ -68,6 +68,14 @@ class CacheJail extends CacheWrapper { } } + 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 @@ class CacheJail extends CacheWrapper { * @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 8d48fd2ddaa..0cb93cca010 100644 --- a/lib/private/Files/Cache/Wrapper/CacheWrapper.php +++ b/lib/private/Files/Cache/Wrapper/CacheWrapper.php @@ -201,7 +201,7 @@ class CacheWrapper extends Cache { } protected function getMoveInfo($path) { - /** @var Cache $cache */ + /** @var Cache|CacheJail $cache */ $cache = $this->getCache(); return $cache->getMoveInfo($path); }