diff options
-rw-r--r-- | apps/files_sharing/lib/scanner.php | 3 | ||||
-rw-r--r-- | apps/files_sharing/lib/sharedstorage.php | 11 | ||||
-rw-r--r-- | lib/private/files/storage/wrapper/jail.php | 9 |
3 files changed, 8 insertions, 15 deletions
diff --git a/apps/files_sharing/lib/scanner.php b/apps/files_sharing/lib/scanner.php index 74394e9ec67..2e951423aa2 100644 --- a/apps/files_sharing/lib/scanner.php +++ b/apps/files_sharing/lib/scanner.php @@ -45,8 +45,7 @@ class SharedScanner extends Scanner { if ($data === null) { return null; } - $sourcePath = '/' . $this->storage->getOwner($path) . '/' . $this->storage->getSourcePath($path); - list($sourceStorage, $internalPath) = \OC\Files\Filesystem::resolvePath($sourcePath); + list($sourceStorage, $internalPath) = $this->storage->resolvePath($path); $data['permissions'] = $sourceStorage->getPermissions($internalPath); return $data; } diff --git a/apps/files_sharing/lib/sharedstorage.php b/apps/files_sharing/lib/sharedstorage.php index fd99503d84a..4fc8276ece6 100644 --- a/apps/files_sharing/lib/sharedstorage.php +++ b/apps/files_sharing/lib/sharedstorage.php @@ -350,17 +350,6 @@ class Shared extends \OC\Files\Storage\Wrapper\Jail implements ISharedStorage { } /** - * Resolve the path for the source of the share - * - * @param string $path - * @return array - */ - public function resolvePath($path) { - $source = '/' . $this->newShare->getShareOwner() . '/' . $this->getSourcePath($path); - return \OC\Files\Filesystem::resolvePath($source); - } - - /** * @param string $path * @param int $type \OCP\Lock\ILockingProvider::LOCK_SHARED or \OCP\Lock\ILockingProvider::LOCK_EXCLUSIVE * @param \OCP\Lock\ILockingProvider $provider diff --git a/lib/private/files/storage/wrapper/jail.php b/lib/private/files/storage/wrapper/jail.php index 6c2a5199f2e..17558170265 100644 --- a/lib/private/files/storage/wrapper/jail.php +++ b/lib/private/files/storage/wrapper/jail.php @@ -451,8 +451,13 @@ class Jail extends Wrapper { $this->storage->changeLock($this->getSourcePath($path), $type, $provider); } + /** + * Resolve the path for the source of the share + * + * @param string $path + * @return array + */ public function resolvePath($path) { - $path = $this->getSourcePath($path); - return \OC\Files\Filesystem::resolvePath($path); + return [$this->storage, $this->getSourcePath($path)]; } } |