diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-04-12 11:44:26 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-12 11:44:26 -0500 |
commit | 31024b7700e025c78c1da94ab77564adeca54dee (patch) | |
tree | 9b3ee396c4947db249ff124157b385a4e90bb590 /apps/files_sharing | |
parent | dccb8928a11fd572337d8b6ff5987cb411172276 (diff) | |
parent | 8500debe79545dfb6a982de1d492478f9db84370 (diff) | |
download | nextcloud-server-31024b7700e025c78c1da94ab77564adeca54dee.tar.gz nextcloud-server-31024b7700e025c78c1da94ab77564adeca54dee.zip |
Merge pull request #4329 from nextcloud/move-out-shared-folder
Fix moving files out of a shared folder
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Scanner.php | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/SharedStorage.php | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/apps/files_sharing/lib/Scanner.php b/apps/files_sharing/lib/Scanner.php index cab04fa9309..8540d296cd6 100644 --- a/apps/files_sharing/lib/Scanner.php +++ b/apps/files_sharing/lib/Scanner.php @@ -51,7 +51,7 @@ class Scanner extends \OC\Files\Cache\Scanner { if ($data === null) { return null; } - $internalPath = $this->storage->getSourcePath($path); + $internalPath = $this->storage->getUnjailedPath($path); $data['permissions'] = $this->storage->getSourceStorage()->getPermissions($internalPath); return $data; } diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index 3293e095590..df613bf86bb 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -232,7 +232,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto } public function fopen($path, $mode) { - if ($source = $this->getSourcePath($path)) { + if ($source = $this->getUnjailedPath($path)) { switch ($mode) { case 'r+': case 'rb+': @@ -274,7 +274,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto 'mode' => $mode, ); \OCP\Util::emitHook('\OC\Files\Storage\Shared', 'fopen', $info); - return $this->nonMaskedStorage->fopen($this->getSourcePath($path), $mode); + return $this->nonMaskedStorage->fopen($this->getUnjailedPath($path), $mode); } return false; } @@ -302,7 +302,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto } } - return $this->nonMaskedStorage->rename($this->getSourcePath($path1), $this->getSourcePath($path2)); + return $this->nonMaskedStorage->rename($this->getUnjailedPath($path1), $this->getUnjailedPath($path2)); } /** @@ -479,7 +479,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto public function file_get_contents($path) { $info = [ 'target' => $this->getMountPoint() . '/' . $path, - 'source' => $this->getSourcePath($path), + 'source' => $this->getUnjailedPath($path), ]; \OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_get_contents', $info); return parent::file_get_contents($path); @@ -488,7 +488,7 @@ class SharedStorage extends \OC\Files\Storage\Wrapper\Jail implements ISharedSto public function file_put_contents($path, $data) { $info = [ 'target' => $this->getMountPoint() . '/' . $path, - 'source' => $this->getSourcePath($path), + 'source' => $this->getUnjailedPath($path), ]; \OCP\Util::emitHook('\OC\Files\Storage\Shared', 'file_put_contents', $info); return parent::file_put_contents($path, $data); |