From 86dc5765df8f278217ff0b175af7d8520634876e Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 19 May 2023 10:59:24 +0800 Subject: [PATCH] core: fix static dir --- packages/hydrooj/src/entry/worker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hydrooj/src/entry/worker.ts b/packages/hydrooj/src/entry/worker.ts index b4419673..bde3a548 100644 --- a/packages/hydrooj/src/entry/worker.ts +++ b/packages/hydrooj/src/entry/worker.ts @@ -96,7 +96,7 @@ export async function apply(ctx: Context) { for (const f of global.addons) { const dir = path.join(f, 'public'); // eslint-disable-next-line no-await-in-loop - if (await fs.pathExists(dir)) await fs.copy(dir, '/root/.hydro/static'); + if (await fs.pathExists(dir)) await fs.copy(dir, path.join(os.homedir(), '.hydro/static')); } await ctx.parallel('app/listen'); logger.success('Server started');