Filesystem: use the updated Mount::findById in getPath to ensure we get the correct path if the storage is also mounted outside the view
This commit is contained in:
parent
577e3b11d7
commit
3e59a87153
1 changed files with 11 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue