From 2bf1d94406baec0ff14ce3012d839536127977ac Mon Sep 17 00:00:00 2001 From: Patrick Wilken <41630502+patrick-wilken@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:30:46 +0100 Subject: [PATCH] sis_setup_directory: fix crash on broken input symlink (#236) --- sisyphus/job.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sisyphus/job.py b/sisyphus/job.py index 63fb731..e161bb5 100644 --- a/sisyphus/job.py +++ b/sisyphus/job.py @@ -281,7 +281,7 @@ def _sis_setup_directory(self, force=False): # I it would be possible to hit some cases where this could # cause a collision sorry if you are really that unlucky... link_name = os.path.join(self._sis_path(gs.JOB_INPUT), str(job_id).replace("/", "_")) - if not os.path.isdir(link_name): + if not os.path.exists(link_name) and not os.path.islink(link_name): os.symlink(src=os.path.abspath(str(creator._sis_path())), dst=link_name, target_is_directory=True) # export the actual job