fix(diff): get cases path
This commit is contained in:
		
							parent
							
								
									1f0ee639dd
								
							
						
					
					
						commit
						05207037f5
					
				|  | @ -276,7 +276,13 @@ def fix_diff( | ||||||
|             stage_cases.append( |             stage_cases.append( | ||||||
|                 result.OptionalCmd( |                 result.OptionalCmd( | ||||||
|                     stdin=result.CmdFile( |                     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), |                     args=(shlex.split(command) if command is not None else None), | ||||||
|                     cpu_limit=cpu_limit, |                     cpu_limit=cpu_limit, | ||||||
|  | @ -299,7 +305,16 @@ def fix_diff( | ||||||
|                             { |                             { | ||||||
|                                 "score": diff_output.score, |                                 "score": diff_output.score, | ||||||
|                                 "fileName": "stdout", |                                 "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, |                                 "forceQuitOnDiff": diff_output.forcequit, | ||||||
|                                 "alwaysHide": diff_output.hide, |                                 "alwaysHide": diff_output.hide, | ||||||
|                                 "compareSpace": not diff_output.ignorespaces, |                                 "compareSpace": not diff_output.ignorespaces, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user