diff --git a/WDL/runtime/task.py b/WDL/runtime/task.py index c54e6618..8ff095eb 100644 --- a/WDL/runtime/task.py +++ b/WDL/runtime/task.py @@ -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