Skip to content

Commit

Permalink
added PermissionError
Browse files Browse the repository at this point in the history
  • Loading branch information
jfennick authored and mr-c committed Jun 25, 2023
1 parent bf12f03 commit 9a3faa7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions cwltool/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,11 @@ def relink_initialworkdir(
except PermissionError:
pass
elif os.path.isdir(host_outdir_tgt) and not vol.resolved.startswith("_:"):
ensure_writable(host_outdir_tgt, include_root=True)
shutil.rmtree(host_outdir_tgt)
try:
ensure_writable(host_outdir_tgt, include_root=True)
shutil.rmtree(host_outdir_tgt)
except PermissionError:
pass
if not vol.resolved.startswith("_:"):
try:
os.symlink(vol.resolved, host_outdir_tgt)
Expand Down

0 comments on commit 9a3faa7

Please sign in to comment.