From 78efd44dbac3d669e306457265c3126507ca259c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 5 Aug 2024 14:51:14 +0200 Subject: [PATCH] fix: check for correct storage class when checking for link parent fixes #39123 Signed-off-by: Robin Appelman --- lib/private/Share20/Manager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index af31226cf08e7..d11f2db338fe3 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -45,6 +45,7 @@ use OC\KnownUser\KnownUserService; use OC\Share20\Exception\ProviderException; use OCA\Files_Sharing\AppInfo\Application; +use OCA\Files_Sharing\SharedStorage; use OCP\EventDispatcher\IEventDispatcher; use OCP\Files\File; use OCP\Files\Folder; @@ -594,7 +595,7 @@ protected function setLinkParent(IShare $share) { // No sense in checking if the method is not there. if (method_exists($share, 'setParent')) { $storage = $share->getNode()->getStorage(); - if ($storage->instanceOfStorage('\OCA\Files_Sharing\ISharedStorage')) { + if ($storage->instanceOfStorage(SharedStorage::class)) { /** @var \OCA\Files_Sharing\SharedStorage $storage */ $share->setParent($storage->getShareId()); }