diff --git a/cwltool/job.py b/cwltool/job.py index 6f11d048f..8ddea7c1b 100644 --- a/cwltool/job.py +++ b/cwltool/job.py @@ -106,8 +106,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)