From 9dac9710e4c87ca87b857bfd9cbd1eb5841cc2ca Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Fri, 31 May 2019 23:16:06 +0200 Subject: [PATCH] Fix full text search for groupfolders Signed-off-by: Morris Jobke --- lib/private/Files/View.php | 4 ++-- lib/private/Share20/Manager.php | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index fef6153fb9..7e177b269d 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1928,7 +1928,7 @@ class View { if ($mount) { try { $storage = $mount->getStorage(); - if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { + if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { $storage->acquireLock( $mount->getInternalPath($absolutePath), $type, @@ -1969,7 +1969,7 @@ class View { if ($mount) { try { $storage = $mount->getStorage(); - if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { + if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { $storage->changeLock( $mount->getInternalPath($absolutePath), $type, diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index c2ea165955..18fefc021f 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1430,6 +1430,9 @@ class Manager implements IManager { if ($path->getId() !== $userFolder->getId() && !$userFolder->isSubNode($path)) { $nodes = $userFolder->getById($path->getId()); $path = array_shift($nodes); + if ($path->getOwner() === null) { + return []; + } $owner = $path->getOwner()->getUID(); }