From 5ae0be08b47d423ad5e48d84368543852f6d42e0 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 25 Jan 2021 17:38:34 +0100 Subject: fix search in nested jails Signed-off-by: Robin Appelman --- lib/private/Share20/Share.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/private/Share20/Share.php') diff --git a/lib/private/Share20/Share.php b/lib/private/Share20/Share.php index 69f36edf4f3..9b782d5a446 100644 --- a/lib/private/Share20/Share.php +++ b/lib/private/Share20/Share.php @@ -32,6 +32,7 @@ namespace OC\Share20; use OCP\Files\Cache\ICacheEntry; use OCP\Files\File; +use OCP\Files\FileInfo; use OCP\Files\IRootFolder; use OCP\Files\Node; use OCP\Files\NotFoundException; @@ -233,8 +234,8 @@ class Share implements \OCP\Share\IShare { */ public function getNodeType() { if ($this->nodeType === null) { - $node = $this->getNode(); - $this->nodeType = $node instanceof File ? 'file' : 'folder'; + $info = $this->getNodeCacheEntry(); + $this->nodeType = $info->getMimeType() === FileInfo::MIMETYPE_FOLDER ? 'folder' : 'file'; } return $this->nodeType; -- cgit v1.2.3