Fix copy from jailed storage
If we have a jailed storage we must also fix the internal path on copy. Else we pass in the wrong path. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
79f4b8566b
commit
745ad2f323
|
@ -411,6 +411,12 @@ class Local extends \OC\Files\Storage\Common {
|
|||
*/
|
||||
public function copyFromStorage(\OCP\Files\Storage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
|
||||
if ($sourceStorage->instanceOfStorage('\OC\Files\Storage\Local')) {
|
||||
if ($sourceStorage->instanceOfStorage(Jail::class)) {
|
||||
/**
|
||||
* @var \OC\Files\Storage\Wrapper\Jail $sourceStorage
|
||||
*/
|
||||
$sourceInternalPath = $sourceStorage->getUnjailedPath($sourceInternalPath);
|
||||
}
|
||||
/**
|
||||
* @var \OC\Files\Storage\Local $sourceStorage
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue