forked from Tomas/webdl
Fix directory resolution for older nodejs
This commit is contained in:
@ -9,7 +9,7 @@ export type Driver = (url: string) => ()=>IDownload;
|
|||||||
const __promises: Promise<any>[] = [];
|
const __promises: Promise<any>[] = [];
|
||||||
const __drivers: Record<string, Driver> = {};
|
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"))
|
if (!ent.endsWith(".js"))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user