From e94662350ab75bf9940bb18e918bf7a5aefc94a4 Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sat, 15 May 2021 22:54:13 +0200 Subject: [PATCH] Support symbolic links to modules Ignore files instead checking if the entry is a directory looking for modules to patch in. This is to support symbolic link to modules. --- packages/slave/slave.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/slave/slave.js b/packages/slave/slave.js index b8f36374..93f3eb79 100755 --- a/packages/slave/slave.js +++ b/packages/slave/slave.js @@ -453,7 +453,7 @@ class Instance extends libLink.Link { // Find stand alone modules to load // XXX for now only the included clusterio module is loaded for (let entry of await fs.readdir(path.join(__dirname, "modules"), { withFileTypes: true })) { - if (entry.isDirectory()) { + if (!entry.isFile()) { if (modules.has(entry.name)) { throw new Error(`Module with name ${entry.name} already exists in a plugin`); }