diff --git a/apps/files_external/lib/Service/StoragesService.php b/apps/files_external/lib/Service/StoragesService.php index 545c1be0da68e..a9359fcd4985e 100644 --- a/apps/files_external/lib/Service/StoragesService.php +++ b/apps/files_external/lib/Service/StoragesService.php @@ -189,8 +189,6 @@ protected function getType(): int { * @return StorageConfig storage config, with added id */ public function addStorage(StorageConfig $newStorage): StorageConfig { - $allStorages = $this->readConfig(); - $configId = $this->dbConfig->addMount( $newStorage->getMountPoint(), $newStorage->getBackend()->getIdentifier(), @@ -218,9 +216,6 @@ public function addStorage(StorageConfig $newStorage): StorageConfig { $this->dbConfig->addApplicable($configId, DBConfigService::APPLICABLE_TYPE_GLOBAL, null); } - // add new storage - $allStorages[$configId] = $newStorage; - $this->eventDispatcher->dispatchTyped(new StorageCreatedEvent($newStorage)); $this->triggerHooks($newStorage, Filesystem::signal_create_mount);