Skip to content
Snippets Groups Projects
Unverified Commit ace7b69a authored by Roeland Jago Douma's avatar Roeland Jago Douma
Browse files

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: default avatarRoeland Jago Douma <roeland@famdouma.nl>
parent d7645ee9
No related branches found
No related tags found
No related merge requests found
...@@ -412,6 +412,12 @@ class Local extends \OC\Files\Storage\Common { ...@@ -412,6 +412,12 @@ class Local extends \OC\Files\Storage\Common {
*/ */
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) { public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = false) {
if ($sourceStorage->instanceOfStorage('\OC\Files\Storage\Local')) { 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 * @var \OC\Files\Storage\Local $sourceStorage
*/ */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment