fix wrong path of device.json

This commit is contained in:
mzdluo123 2021-01-13 23:34:46 +08:00
parent b16e876718
commit 96e2a8e2e4
No known key found for this signature in database
GPG Key ID: 9F7BC2C154107A1D

View File

@ -139,6 +139,7 @@ public interface MiraiConsole : CoroutineScope {
@Suppress("UNREACHABLE_CODE") @Suppress("UNREACHABLE_CODE")
private fun addBotImpl(id: Long, password: Any, configuration: BotConfiguration.() -> Unit = {}): Bot { private fun addBotImpl(id: Long, password: Any, configuration: BotConfiguration.() -> Unit = {}): Bot {
var config = BotConfiguration().apply { var config = BotConfiguration().apply {
workingDir = rootDir
fileBasedDeviceInfo() fileBasedDeviceInfo()
redirectNetworkLogToDirectory() redirectNetworkLogToDirectory()
this.botLoggerSupplier = { this.botLoggerSupplier = {
@ -153,6 +154,7 @@ public interface MiraiConsole : CoroutineScope {
config = GlobalComponentStorage.run { config = GlobalComponentStorage.run {
BotConfigurationAlterer.foldExtensions(config) { acc, extension -> BotConfigurationAlterer.foldExtensions(config) { acc, extension ->
extension.alterConfiguration(id, acc) extension.alterConfiguration(id, acc)
} }
} }