judge: remove useless suffix

This commit is contained in:
undefined committed 2022-09-06 13:02:46 +08:00
1 parent 805c8e4cd3
commit 7f967060cd
12 files changed
+61 -60

No files matched your search

+2 -2
View File
@@ -19,7 +19,7 @@ interface Session {
getNext: (task: JudgeTask) => NextFunction;
getEnd: (task: JudgeTask) => NextFunction;
cacheOpen: (source: string, files: any[], next?: NextFunction) => Promise<string>;
fetchCodeFile: (target: string) => Promise<string>;
fetchFile: (target: string) => Promise<string>;
config: { detail: boolean, host?: string };
}
@@ -110,7 +110,7 @@ export class JudgeTask {
if ((this.code as any).content.startsWith('@@hydro_submission_file@@')) {
const id = (this.code as any).content.split('@@hydro_submission_file@@')[1]?.split('#')?.[0];
if (!id) throw new SystemError('Submission File Not Found');
const target = await this.session.fetchCodeFile(id);
const target = await this.session.fetchFile(id);
this.code = { src: target };
this.clean.push(() => fs.remove(target));
}