mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Fix #133
This commit is contained in:
parent
5665bde12c
commit
16242c9a93
@ -149,10 +149,13 @@ public interface FilePluginLoader<P : Plugin, D : PluginDescription> : PluginLoa
|
||||
* @see FilePluginLoader
|
||||
*/
|
||||
public abstract class AbstractFilePluginLoader<P : Plugin, D : PluginDescription>(
|
||||
/**
|
||||
* 所支持的插件文件后缀, 含 '.'. 如 [JarPluginLoader] 为 ".jar"
|
||||
*/
|
||||
public override val fileSuffix: String
|
||||
) : FilePluginLoader<P, D> {
|
||||
private fun pluginsFilesSequence(): Sequence<File> =
|
||||
PluginManager.pluginsPath.toFile().walk()
|
||||
PluginManager.pluginsFolder.listFiles().orEmpty().asSequence()
|
||||
.filter { it.isFile && it.name.endsWith(fileSuffix, ignoreCase = true) }
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user