diff options
author | Joas Schilling <coding@schilljs.com> | 2020-03-09 19:00:31 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-03-09 19:00:31 +0300 |
commit | 886293fdcc3a6875c2670b5f43f488a31efc937f (patch) | |
tree | 91281251837a64ecd9b3151a50d57b92ae2f1d8a /apps/files_sharing | |
parent | 5a8c7854d622b0e99a7c877aaf06807161039db2 (diff) |
Don't break when one remote share is down
getFileInfo can also return false
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/lib/Controller/RemoteController.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_sharing/lib/Controller/RemoteController.php b/apps/files_sharing/lib/Controller/RemoteController.php index f420d695746..499c6d9c2e6 100644 --- a/apps/files_sharing/lib/Controller/RemoteController.php +++ b/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(); |