Merge pull request #6061 from nextcloud/stable12_6052

[stable12] Fix copy from jailed storage
This commit is contained in:
Morris Jobke 2017-08-10 13:57:18 +02:00 committed by GitHub
commit 36d6a24402
1 changed files with 6 additions and 0 deletions

View File

@ -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
*/