Skip to content

Commit

Permalink
fix use_relative_output_paths when some parent of run dir is a symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
mlin committed May 15, 2023
1 parent d8f0a03 commit 8def8d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion WDL/runtime/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,9 @@ def map_path_relative(v: Union[Value.File, Value.Directory]) -> str:
if path_really_within(target, os.path.join(run_dir, "work")):
# target was generated by current task; use its path relative to the task work dir
if not os.path.basename(run_dir).startswith("download-"): # except download tasks
rel_link = os.path.relpath(real_target, os.path.join(run_dir, "work"))
rel_link = os.path.relpath(
real_target, os.path.realpath(os.path.join(run_dir, "work"))
)
else:
# target is an out/ link generated by a call in the current workflow OR a cached
# run; use the link's path relative to that out/ dir, which by induction should
Expand Down

0 comments on commit 8def8d6

Please sign in to comment.