mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +09:00
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.
This commit is contained in:
1 parent
0ae4fa0d2e
commit
e94662350a
1 file changed
+1
-1
@@ -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`);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user