judge: call removeNixPath for case message

This commit is contained in:
undefined committed 2022-11-20 22:21:26 +08:00
1 parent 067eb2c348
commit 6e79c8995c
1 file changed
+1 -1
+1 -1
View File
@@ -145,7 +145,7 @@ export default class Hydro {
send(rid: string | ObjectID, key: 'next' | 'end', data: Partial<JudgeResultBody>) {
data.rid = new ObjectID(rid);
data.key = key;
if (data.case) data.case.message ||= '';
if (data.case) data.case.message = removeNixPath(data.case.message || '');
if (typeof data.message === 'string') data.message = removeNixPath(data.message);
if (typeof data.compilerText === 'string') data.compilerText = removeNixPath(data.compilerText);
this.ws.send(JSON.stringify(data));