Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't error on collision #5138

Merged
merged 5 commits into from
Oct 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Don't error on collision
  • Loading branch information
stxue1 committed Oct 24, 2024
commit 72773164502f1cbe91185ad478b23d978055ae42
7 changes: 6 additions & 1 deletion src/toil/cwl/cwltoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -2366,7 +2366,12 @@ def _realpath(
# Probably staging and bypassing file store. Just copy.
logger.log(log_level, "Saving %s...", dest_url)
os.makedirs(os.path.dirname(p.target), exist_ok=True)
shutil.copyfile(p.resolved, p.target)
try:
shutil.copyfile(p.resolved, p.target)
except shutil.SameFileError:
# If outdir isn't set and we're passing through an input file/directory as the output,
# the file doesn't need to be copied because it is already there
pass
else:
uri = p.resolved
if not uri.startswith("toilfile:"):
Expand Down
Loading