1
0
forked from Tomas/webdl

Fix directory resolution for older nodejs

This commit is contained in:
2026-01-09 03:46:12 +01:00
parent c4fce38086
commit ec8a0cd84e

View File

@ -9,7 +9,7 @@ export type Driver = (url: string) => ()=>IDownload;
const __promises: Promise<any>[] = [];
const __drivers: Record<string, Driver> = {};
for (const ent of fs.readdirSync(path.join(import.meta.dirname, "movies")))
for (const ent of fs.readdirSync(path.join(path.dirname(new URL(import.meta.url).pathname), "movies")))
{
if (!ent.endsWith(".js"))
continue;