Don't break when one remote share is down

getFileInfo can also return false

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-03-09 17:00:31 +01:00
parent 5a8c7854d6
commit 886293fdcc
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
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/');
$info = $view->getFileInfo($share['mountpoint']);
if ($info === false) {
return $share;
}
$share['mimetype'] = $info->getMimetype();
$share['mtime'] = $info->getMTime();
$share['permissions'] = $info->getPermissions();