diff --git a/apps/files_sharing/lib/MountProvider.php b/apps/files_sharing/lib/MountProvider.php index 8047a0934a709..ee67d24824d4f 100644 --- a/apps/files_sharing/lib/MountProvider.php +++ b/apps/files_sharing/lib/MountProvider.php @@ -15,6 +15,7 @@ use OCP\Files\Config\IAuthoritativeMountProvider; use OCP\Files\Config\IMountProvider; use OCP\Files\Config\IPartialMountProvider; +use OCP\Files\IRootFolder; use OCP\Files\Mount\IMountManager; use OCP\Files\Mount\IMountPoint; use OCP\Files\Storage\IStorageFactory; diff --git a/apps/files_sharing/lib/SharedStorage.php b/apps/files_sharing/lib/SharedStorage.php index c1e8faeae338b..a85915c78a5dd 100644 --- a/apps/files_sharing/lib/SharedStorage.php +++ b/apps/files_sharing/lib/SharedStorage.php @@ -154,9 +154,7 @@ private function init() { throw new \Exception('Maximum share depth reached'); } - /** @var IRootFolder $rootFolder */ - $rootFolder = Server::get(IRootFolder::class); - $this->ownerUserFolder = $rootFolder->getUserFolder($this->superShare->getShareOwner()); + $this->ownerUserFolder = $this->rootFolder->getUserFolder($this->superShare->getShareOwner()); $sourceId = $this->superShare->getNodeId(); $ownerNodes = $this->ownerUserFolder->getById($sourceId);