summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-10 10:21:56 +0200
committerGitHub <noreply@github.com>2017-08-10 10:21:56 +0200
commit3dc1bcd4c1918898808c0d97e2771229cc4331b9 (patch)
treee4a7fd05db62a3fabe6381daae46f2fc0f789681
parent073216e8278983abef6ac51d6e0a900f95af0024 (diff)
parentace7b69aa77e9df27e83c1eb2b3ec6bf2b93d493 (diff)
downloadnextcloud-server-3dc1bcd4c1918898808c0d97e2771229cc4331b9.tar.gz
nextcloud-server-3dc1bcd4c1918898808c0d97e2771229cc4331b9.zip
Merge pull request #6052 from nextcloud/fix_jail_copy
Fix copy from jailed storage
-rw-r--r--lib/private/Files/Storage/Local.php6
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
*/