diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 9b54592dd1e74..08daa67ebc9f7 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -297,7 +297,7 @@ protected function generalCreateChecks(IShare $share) { $isFederatedShare = $share->getNode()->getStorage()->instanceOfStorage('\OCA\Files_Sharing\External\Storage'); $permissions = 0; - if (!$isFederatedShare && $share->getNode()->getOwner() && $share->getNode()->getOwner()->getUID() !== $share->getSharedBy()) { + if (!$isFederatedShare && $share->getShareOwner() !== $share->getSharedBy()) { $userMounts = array_filter($userFolder->getById($share->getNode()->getId()), function ($mount) { // We need to filter since there might be other mountpoints that contain the file // e.g. if the user has access to the same external storage that the file is originating from