diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/files/view.php | 14 |
1 files 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; } } |