mirror of
https://github.com/nextcloud/server.git
synced 2026-03-22 02:21:12 -04:00
always triger setup of builtin storage wrappers
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
6c42874f04
commit
13eef55a92
1 changed files with 15 additions and 6 deletions
|
|
@ -82,6 +82,7 @@ class SetupManager {
|
|||
private IConfig $config;
|
||||
private bool $listeningForProviders;
|
||||
private array $fullSetupRequired = [];
|
||||
private bool $setupBuiltinWrappersDone = false;
|
||||
|
||||
public function __construct(
|
||||
IEventLogger $eventLogger,
|
||||
|
|
@ -121,6 +122,15 @@ class SetupManager {
|
|||
}
|
||||
|
||||
private function setupBuiltinWrappers() {
|
||||
if ($this->setupBuiltinWrappersDone) {
|
||||
return;
|
||||
}
|
||||
$this->setupBuiltinWrappersDone = true;
|
||||
|
||||
// load all filesystem apps before, so no setup-hook gets lost
|
||||
OC_App::loadApps(['filesystem']);
|
||||
$prevLogging = Filesystem::logWarningWhenAddingStorageWrapper(false);
|
||||
|
||||
Filesystem::addStorageWrapper('mount_options', function ($mountPoint, IStorage $storage, IMountPoint $mount) {
|
||||
if ($storage->instanceOfStorage(Common::class)) {
|
||||
$storage->setMountOptions($mount->getOptions());
|
||||
|
|
@ -188,6 +198,8 @@ class SetupManager {
|
|||
}
|
||||
return $storage;
|
||||
});
|
||||
|
||||
Filesystem::logWarningWhenAddingStorageWrapper($prevLogging);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -223,6 +235,9 @@ class SetupManager {
|
|||
return;
|
||||
}
|
||||
$this->setupUsers[] = $user->getUID();
|
||||
|
||||
$this->setupBuiltinWrappers();
|
||||
|
||||
$prevLogging = Filesystem::logWarningWhenAddingStorageWrapper(false);
|
||||
|
||||
OC_Hook::emit('OC_Filesystem', 'preSetup', ['user' => $user->getUID()]);
|
||||
|
|
@ -321,14 +336,8 @@ class SetupManager {
|
|||
|
||||
$this->eventLogger->start('setup_root_fs', 'Setup root filesystem');
|
||||
|
||||
// load all filesystem apps before, so no setup-hook gets lost
|
||||
OC_App::loadApps(['filesystem']);
|
||||
$prevLogging = Filesystem::logWarningWhenAddingStorageWrapper(false);
|
||||
|
||||
$this->setupBuiltinWrappers();
|
||||
|
||||
Filesystem::logWarningWhenAddingStorageWrapper($prevLogging);
|
||||
|
||||
$rootMounts = $this->mountProviderCollection->getRootMounts();
|
||||
foreach ($rootMounts as $rootMountProvider) {
|
||||
$this->mountManager->addMount($rootMountProvider);
|
||||
|
|
|
|||
Loading…
Reference in a new issue