Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sis_setup_directory: fix crash on broken input symlink #236

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

patrick-wilken
Copy link

@patrick-wilken patrick-wilken commented Jan 10, 2025

Small thing that annoys me from time to time: linking the job inputs fails with "File exists" if the creator path does not exist (and multiple inputs have same creator) because isdir(broken_symlink) == False.
If you run into this, clearly something else is wrong, but should fail at another place, not here.

Copy link
Contributor

@michelwi michelwi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we even remove the isdir check now?

@patrick-wilken
Copy link
Author

Hmm, would work, yes. Except if somehow one manages to create an actual directory (or file) with that name. Most robust would actually be to check exists and islink, then we never crash because of existing file here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants