Merge pull request #19861 from nextcloud/bugfix/noid/load-remote-shares-also-when-one-is-down

Don't break when one remote share is down
This commit is contained in:
Joas Schilling 2020-03-11 09:36:57 +01:00 committed by GitHub
commit 24d0fb9fcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -117,6 +117,10 @@ class RemoteController extends OCSController {
$view = new \OC\Files\View('/' . \OC_User::getUser() . '/files/'); $view = new \OC\Files\View('/' . \OC_User::getUser() . '/files/');
$info = $view->getFileInfo($share['mountpoint']); $info = $view->getFileInfo($share['mountpoint']);
if ($info === false) {
return $share;
}
$share['mimetype'] = $info->getMimetype(); $share['mimetype'] = $info->getMimetype();
$share['mtime'] = $info->getMTime(); $share['mtime'] = $info->getMTime();
$share['permissions'] = $info->getPermissions(); $share['permissions'] = $info->getPermissions();