From e96bb6c8bcbebc0aaf05153a91ad30e395eefe5e Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 9 Mar 2020 17:00:31 +0100 Subject: [PATCH] Don't break when one remote share is down getFileInfo can also return false Signed-off-by: Joas Schilling --- apps/files_sharing/lib/Controller/RemoteController.php | 4 ++++ 1 file changed, 4 insertions(+) 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(); -- 2.39.5