From 6e79c8995cd2113a274ecf550673b43d470b069f Mon Sep 17 00:00:00 2001 From: undefined Date: Sun, 20 Nov 2022 22:21:26 +0800 Subject: [PATCH] judge: call removeNixPath for case message --- packages/hydrojudge/src/hosts/hydro.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/hydrojudge/src/hosts/hydro.ts b/packages/hydrojudge/src/hosts/hydro.ts index 50ca35711..075e1c4f7 100644 --- a/packages/hydrojudge/src/hosts/hydro.ts +++ b/packages/hydrojudge/src/hosts/hydro.ts @@ -145,7 +145,7 @@ export default class Hydro { send(rid: string | ObjectID, key: 'next' | 'end', data: Partial) { 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));