Skip to content

Commit

Permalink
fix: check for correct storage class when checking for link parent
Browse files Browse the repository at this point in the history
fixes #39123

Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and AndyScherzinger committed Sep 4, 2024
1 parent 70651b6 commit 8871665
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -602,7 +603,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());
}
Expand Down

0 comments on commit 8871665

Please sign in to comment.