From 3e59a8715390d659b433797c8a0ed080518e5e7d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 28 Jan 2013 01:02:04 +0100 Subject: Filesystem: use the updated Mount::findById in getPath to ensure we get the correct path if the storage is also mounted outside the view --- lib/files/view.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/files/view.php b/lib/files/view.php index c2038f222a0..302232b5134 100644 --- a/lib/files/view.php +++ b/lib/files/view.php @@ -943,8 +943,16 @@ class View { */ public function getPath($id) { list($storage, $internalPath) = Cache\Cache::getById($id); - $mount = Mount::findById($storage); - $fullPath = $mount->getMountPoint() . $internalPath; - return $this->getRelativePath($fullPath); + $mounts = Mount::findById($storage); + foreach ($mounts as $mount) { + /** + * @var \OC\Files\Mount $mount + */ + $fullPath = $mount->getMountPoint() . $internalPath; + if (!is_null($path = $this->getRelativePath($fullPath))) { + return $path; + } + } + return null; } } -- cgit v1.2.3