Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: check for correct storage class when checking for link parent
fixes #39123

Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Aug 16, 2024
commit a92171260f12bfc6a476c326d22cb28f6ab4dc2e
3 changes: 2 additions & 1 deletion lib/private/Share20/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,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 @@ -570,7 +571,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