From 886293fdcc3a6875c2670b5f43f488a31efc937f 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 f420d695746c3..499c6d9c2e6d7 100644 --- a/apps/files_sharing/lib/Controller/RemoteController.php +++ b/apps/files_sharing/lib/Controller/RemoteController.php @@ -117,6 +117,10 @@ private static function extendShareInfo($share) { $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();