From: Joas Schilling Date: Mon, 9 Mar 2020 16:00:31 +0000 (+0100) Subject: Don't break when one remote share is down X-Git-Tag: v18.0.4RC1~85^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F19886%2Fhead;p=nextcloud-server.git Don't break when one remote share is down getFileInfo can also return false Signed-off-by: Joas Schilling --- 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();