refactor/main #11

Merged
李衍志523370910113 merged 23 commits from refactor/main into dev 2025-02-27 15:51:32 +08:00
Showing only changes of commit 05207037f5 - Show all commits

View File

@ -276,7 +276,13 @@ def fix_diff(
stage_cases.append(
result.OptionalCmd(
stdin=result.CmdFile(
src=f"/home/tt/.config/joj/{task_conf.task.type_}/{stdin}"
src=(
(task_conf.root / task_conf.path)
.parent.joinpath(stdin)
.name
if task_conf.root is not None and task_conf.path is not None
else f"/home/tt/.config/joj/{task_conf.task.type_}/{stdin}"
)
),
args=(shlex.split(command) if command is not None else None),
cpu_limit=cpu_limit,
@ -299,7 +305,16 @@ def fix_diff(
{
"score": diff_output.score,
"fileName": "stdout",
"answerPath": f"/home/tt/.config/joj/{task_conf.task.type_}/{stdout}",
"answerPath": (
(task_conf.root / task_conf.path)
.parent.joinpath(stdout)
.name
if (
task_conf.root is not None
and task_conf.path is not None
)
else f"/home/tt/.config/joj/{task_conf.task.type_}/{stdout}"
),
"forceQuitOnDiff": diff_output.forcequit,
"alwaysHide": diff_output.hide,
"compareSpace": not diff_output.ignorespaces,