mirror of
https://github.com/DinheroDevelopmentGroup/modular-minecraft-proxy.git
synced 2025-02-17 00:21:37 -05:00
less finicky import modules
This commit is contained in:
parent
abb3721b6d
commit
c7fa5a4b1d
1 changed files with 2 additions and 5 deletions
|
@ -25,12 +25,9 @@ export async function* importModulesGenerator(
|
|||
callbacks?: Callbacks,
|
||||
): AsyncGenerator<unknown> {
|
||||
for (const entry of await readdir(directory, { withFileTypes: true })) {
|
||||
const path = resolve(entry.path, entry.name, index);
|
||||
const path = resolve(entry.parentPath, entry.name, index);
|
||||
|
||||
if (!entry.isDirectory())
|
||||
console.warn(
|
||||
`Expected ${entry.name} to be a directory (located at ${entry.path})`,
|
||||
);
|
||||
if (!entry.isDirectory()) continue;
|
||||
|
||||
if (!(await exists(path))) continue;
|
||||
|
||||
|
|
Loading…
Reference in a new issue