summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-03-09 17:00:31 +0100
committerJoas Schilling <coding@schilljs.com>2020-03-09 17:00:31 +0100
commit886293fdcc3a6875c2670b5f43f488a31efc937f (patch)
tree91281251837a64ecd9b3151a50d57b92ae2f1d8a /apps/files_sharing/lib
parent5a8c7854d622b0e99a7c877aaf06807161039db2 (diff)
downloadnextcloud-server-886293fdcc3a6875c2670b5f43f488a31efc937f.tar.gz
nextcloud-server-886293fdcc3a6875c2670b5f43f488a31efc937f.zip
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/lib')
-rw-r--r--apps/files_sharing/lib/Controller/RemoteController.php4
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();