diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 12:56:31 +0300 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-08-13 13:32:08 +0300 |
commit | 4771a36b6cdc1e1199baedd457ca6167d41b7a49 (patch) | |
tree | 97a3cadabdd1344155708fd9f85805ea0fa6456f | |
parent | bfca9fbf115741e47a847ddb0116de1f82e8ba8d (diff) |
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>
-rw-r--r-- | lib/private/Files/Storage/Local.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/private/Files/Storage/Local.php b/lib/private/Files/Storage/Local.php index 70cb2e0ccc4..c4e2dd68339 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -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 */ |