From e0ea60db7042bb0e79072f95cb8d8ded6de1577e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B5=A9=E6=96=8C?= Date: Mon, 21 Nov 2016 07:51:58 +0800 Subject: [PATCH 1/2] Update judge_client.cc --- trunk/core/judge_client/judge_client.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/trunk/core/judge_client/judge_client.cc b/trunk/core/judge_client/judge_client.cc index 35e73d89631..326aa573b46 100644 --- a/trunk/core/judge_client/judge_client.cc +++ b/trunk/core/judge_client/judge_client.cc @@ -2230,10 +2230,8 @@ int main(int argc, char** argv) { update_problem(p_id); if (!http_judge) mysql_close(conn); - if (!DEBUG) - clean_workdir(work_dir); - else - write_log("compile error"); + clean_workdir(work_dir); + write_log("compile error"); exit(0); } else { update_solution(solution_id, OJ_RI, 0, 0, 0, 0, 0.0); From 38ccdaa4616f39c68ce6b3efa886b07c3f9320a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=B5=A9=E6=96=8C?= Date: Mon, 21 Nov 2016 08:00:08 +0800 Subject: [PATCH 2/2] Update judge_client.cc --- trunk/core/judge_client/judge_client.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/trunk/core/judge_client/judge_client.cc b/trunk/core/judge_client/judge_client.cc index 326aa573b46..27381347ea2 100644 --- a/trunk/core/judge_client/judge_client.cc +++ b/trunk/core/judge_client/judge_client.cc @@ -1990,8 +1990,7 @@ void clean_workdir(char * work_dir) { if (DEBUG) { execute_cmd("/bin/mv %s/* %slog/", work_dir, work_dir); } else { - execute_cmd("/bin/rm -rf %s/*", work_dir); - + execute_cmd("/bin/rm -f %s/*", work_dir); } } @@ -2317,7 +2316,7 @@ int main(int argc, char** argv) { addcustomout(solution_id); } update_solution(solution_id, OJ_TR, usedtime, topmemory >> 10, 0, 0, 0); - + clean_workdir(work_dir); exit(0); }