ソースを参照

Modify the order of rename execution

Karlatemp 4 年 前
コミット
84b66692e9

+ 3 - 3
mirai-console/backend/mirai-console/src/internal/plugin/BuiltInJvmPluginLoaderImpl.kt

@@ -139,14 +139,14 @@ internal object BuiltInJvmPluginLoaderImpl :
         }
         logger.verbose { "Loading plugin ${plugin.description.smartToString()}" }
         runCatching {
+            // move nameFolder in config and data to idFolder
+            PluginManager.pluginsDataPath.moveNameFolder(plugin)
+            PluginManager.pluginsConfigPath.moveNameFolder(plugin)
             check(plugin is JvmPluginInternal) { "A JvmPlugin must extend AbstractJvmPlugin to be loaded by JvmPluginLoader.BuiltIn" }
             plugin.internalOnLoad()
         }.getOrElse {
             throw PluginLoadException("Exception while loading ${plugin.description.smartToString()}", it)
         }
-        // move nameFolder in config and data to idFolder
-        PluginManager.pluginsDataPath.moveNameFolder(plugin)
-        PluginManager.pluginsConfigPath.moveNameFolder(plugin)
     }
 
     override fun enable(plugin: JvmPlugin) {