From 66517e7b6f8a923de79feaf9dcb9d6178d2e5855 Mon Sep 17 00:00:00 2001 From: Menci Date: Tue, 5 Mar 2019 12:50:21 +0800 Subject: [PATCH] Fix File Error detection. --- src/runner/judge.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runner/judge.ts b/src/runner/judge.ts index a051101..9c8ec54 100644 --- a/src/runner/judge.ts +++ b/src/runner/judge.ts @@ -208,7 +208,7 @@ export async function judgeStandard(task: StandardRunTask) try { await fse.move(pathLib.join(workingDir, outputFileName), pathLib.join(spjWorkingDir, 'user_out')); } catch (e) { - if (e.code === 'ENOENT' && runResult.result.status === SandboxStatus.OK) { + if (e.code === 'ENOENT' && runResult.result.status === SandboxStatus.OK && !runResult.outputLimitExceeded) { status = TestcaseResultType.FileError; } } @@ -388,4 +388,4 @@ export async function judgeInteraction(task: InteractionRunTask) await tryEmptyDir(spjWorkingDir); await tryEmptyDir(workingDir); } -} \ No newline at end of file +}