Fixed plugin loader dir not found

This commit is contained in:
2025-12-22 21:26:29 +01:00
parent efeabe279f
commit 33f04aeeee
+6 -1
View File
@@ -94,9 +94,14 @@ impl PluginLoader {
}
pub fn load_all(&self, server: &Arc<Server>) {
let path = server.root.join("plugins");
if !path.exists() {
fs::create_dir(&path).unwrap();
}
// Load plugins
LOGGER.info("Loading plugins");
for entry in fs::read_dir(server.root.join("plugins")).unwrap() {
for entry in fs::read_dir(&path).unwrap() {
let entry = entry.unwrap();
let path = entry.path();