Skip to content

Commit

Permalink
sis_setup_directory: fix crash on broken input symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-wilken committed Feb 6, 2025
1 parent 2376324 commit a2b8d34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sisyphus/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a2b8d34

Please sign in to comment.