Skip to content

Commit 5a41c60

Browse files
icewind1991AndyScherzinger
authored andcommitted
fix: check for correct storage class when checking for link parent
fixes #39123 Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent d76b763 commit 5a41c60

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/private/Share20/Manager.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
use OC\KnownUser\KnownUserService;
4646
use OC\Share20\Exception\ProviderException;
4747
use OCA\Files_Sharing\AppInfo\Application;
48+
use OCA\Files_Sharing\SharedStorage;
4849
use OCP\EventDispatcher\IEventDispatcher;
4950
use OCP\Files\File;
5051
use OCP\Files\Folder;
@@ -602,7 +603,7 @@ protected function setLinkParent(IShare $share) {
602603
// No sense in checking if the method is not there.
603604
if (method_exists($share, 'setParent')) {
604605
$storage = $share->getNode()->getStorage();
605-
if ($storage->instanceOfStorage('\OCA\Files_Sharing\ISharedStorage')) {
606+
if ($storage->instanceOfStorage(SharedStorage::class)) {
606607
/** @var \OCA\Files_Sharing\SharedStorage $storage */
607608
$share->setParent($storage->getShareId());
608609
}

0 commit comments

Comments
 (0)