Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-03-09 19:00:31 +0300
committerJoas Schilling <coding@schilljs.com>2020-03-09 19:00:31 +0300
commit886293fdcc3a6875c2670b5f43f488a31efc937f (patch)
tree91281251837a64ecd9b3151a50d57b92ae2f1d8a /apps/files_sharing/lib/Controller
parent5a8c7854d622b0e99a7c877aaf06807161039db2 (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/lib/Controller')
-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();