core: fix contest export for file submission

This commit is contained in:
undefined committed 2023-06-09 13:05:14 +08:00
1 parent 7b4083e4c6
commit 93bf79e6ad
1 file changed
+1 -1
+1 -1
View File
@@ -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));