Browse Source

Fix full text search for groupfolders

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Morris Jobke 4 years ago
parent
commit
9ad616e221
2 changed files with 5 additions and 2 deletions
  1. 2 2
      lib/private/Files/View.php
  2. 3 0
      lib/private/Share20/Manager.php

+ 2 - 2
lib/private/Files/View.php

@@ -1925,7 +1925,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,
@@ -1966,7 +1966,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,

+ 3 - 0
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();
 		}