diff --git a/cwltool/job.py b/cwltool/job.py index 6693c4cfd..607fb782c 100644 --- a/cwltool/job.py +++ b/cwltool/job.py @@ -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)