Don't break when one remote share is down

getFileInfo can also return false

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/19861/head
Joas Schilling 5 years ago
parent 5a8c7854d6
commit 886293fdcc
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
  1. 4
      apps/files_sharing/lib/Controller/RemoteController.php

@ -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();

Loading…
Cancel
Save