mirror of
https://github.com/QingdaoU/JudgeServer.git
synced 2024-12-29 14:11:44 +00:00
fix permission denied
This commit is contained in:
parent
35ca0b6dbd
commit
e81fc56481
@ -2,6 +2,7 @@ import _judger
|
|||||||
import hashlib
|
import hashlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import shutil
|
||||||
from multiprocessing import Pool
|
from multiprocessing import Pool
|
||||||
|
|
||||||
import psutil
|
import psutil
|
||||||
@ -108,7 +109,7 @@ class JudgeClient(object):
|
|||||||
# todo check permission
|
# todo check permission
|
||||||
user_output_file = os.path.join(user_output_dir, self._io_mode["output"])
|
user_output_file = os.path.join(user_output_dir, self._io_mode["output"])
|
||||||
real_user_output_file = os.path.join(user_output_dir, "stdio.txt")
|
real_user_output_file = os.path.join(user_output_dir, "stdio.txt")
|
||||||
os.symlink(in_file, os.path.join(user_output_dir, self._io_mode["input"]))
|
shutil.copyfile(in_file, os.path.join(user_output_dir, self._io_mode["input"]))
|
||||||
kwargs = {"input_path": in_file, "output_path": real_user_output_file, "error_path": real_user_output_file}
|
kwargs = {"input_path": in_file, "output_path": real_user_output_file, "error_path": real_user_output_file}
|
||||||
else:
|
else:
|
||||||
real_user_output_file = user_output_file = os.path.join(self._submission_dir, test_case_file_id + ".out")
|
real_user_output_file = user_output_file = os.path.join(self._submission_dir, test_case_file_id + ".out")
|
||||||
|
Loading…
Reference in New Issue
Block a user