mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-21 01:46:28 +08:00
judge: remove useless suffix
This commit is contained in:
1 parent
805c8e4cd3
commit
7f967060cd
12 files changed
+61
-60
No files matched your search
@@ -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));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user