Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions apps/files_sharing/lib/MountProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,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;
Expand Down Expand Up @@ -262,6 +263,7 @@ public function getMountsFromSuperShares(
$newMaxValidatedShare = $maxValidatedShare;
$appConfig = Server::get(IAppConfig::class);
$cacheDependencies = Server::get(CacheDependencies::class);
$rootFolder = Server::get(IRootFolder::class);

foreach ($superShares as $share) {
[$parentShare, $groupedShares] = $share;
Expand Down Expand Up @@ -293,6 +295,7 @@ public function getMountsFromSuperShares(
'shareManager' => $this->shareManager,
'appConfig' => $appConfig,
'cacheDependencies' => $cacheDependencies,
'rootFolder' => $rootFolder,
],
$loader,
$this->eventDispatcher,
Expand Down
6 changes: 3 additions & 3 deletions apps/files_sharing/lib/SharedStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ class SharedStorage extends Jail implements LegacyISharedStorage, ISharedStorage
*/
private static int $initDepth = 0;
private CacheDependencies $cacheDependencies;
private IRootFolder $rootFolder;

public function __construct(array $parameters) {
$this->ownerView = $parameters['ownerView'];
$this->logger = $parameters['logger'] ?? Server::get(LoggerInterface::class);
$this->appConfig = $parameters['appConfig'] ?? Server::get(IAppConfig::class);
$this->shareManager = $parameters['shareManager'] ?? Server::get(IShareManager::class);
$this->cacheDependencies = $parameters['cacheDependencies'] ?? Server::get(CacheDependencies::class);
$this->rootFolder = $parameters['rootFolder'] ?? Server::get(IRootFolder::class);

$this->superShare = $parameters['superShare'];
$this->groupedShares = $parameters['groupedShares'];
Expand Down Expand Up @@ -160,9 +162,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);

Expand Down
Loading