diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 11:56:31 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 11:56:31 +0200 |
commit | ace7b69aa77e9df27e83c1eb2b3ec6bf2b93d493 (patch) | |
tree | 9805c67dbf6c461e43fd61626c95495d17ca541a /lib/private/Files/Storage/Local.php | |
parent | d7645ee9283352092c2a4e480536cbcb99a2e86c (diff) | |
download | nextcloud-server-ace7b69aa77e9df27e83c1eb2b3ec6bf2b93d493.tar.gz nextcloud-server-ace7b69aa77e9df27e83c1eb2b3ec6bf2b93d493.zip |
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>
Diffstat (limited to 'lib/private/Files/Storage/Local.php')
-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 c19427e5f9b..0577093712e 100644 --- a/lib/private/Files/Storage/Local.php +++ b/lib/private/Files/Storage/Local.php @@ -412,6 +412,12 @@ class Local extends \OC\Files\Storage\Common { */ public function copyFromStorage(IStorage $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 */ |