From 93bf79e6ade2472e1e887911606ad98f561a3ead Mon Sep 17 00:00:00 2001 From: undefined Date: Fri, 9 Jun 2023 13:05:14 +0800 Subject: [PATCH] core: fix contest export for file submission --- packages/hydrooj/src/handler/contest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hydrooj/src/handler/contest.ts b/packages/hydrooj/src/handler/contest.ts index 3f087b03..5d77ebf3 100644 --- a/packages/hydrooj/src/handler/contest.ts +++ b/packages/hydrooj/src/handler/contest.ts @@ -536,7 +536,7 @@ export class ContestCodeHandler extends Handler { if (!id) return; zip.addFile( `${rnames[rdoc._id.toHexString()]}.${filename || 'txt'}`, - await streamToBuffer(storage.get(id)), + await streamToBuffer(await storage.get(`submission/${id}`)), ); } else if (rdoc.code) { zip.addFile(`${rnames[rdoc._id.toHexString()]}.${rdoc.lang}`, Buffer.from(rdoc.code));