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
BUGFIX: Avoid race condition on symlink publishing #2669
Conversation
If the symlink could not be created but exists, check if it points to the expected target and ignore the error in that case. Fixes #2667
ping… |
ping … |
1 similar comment
ping … |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏻
$result = false; | ||
} | ||
|
||
if (Files::is_link($targetPathAndFilename) && realpath($targetPathAndFilename) === realpath($sourcePathAndFilename)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can there be a situation where both realpath
return false
? (since false === false
)
i only know that realpath
doesnt like stream wrapper and returns false then ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, well. Technically, yes, that could happen. But I think we can ignore that here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
btw i do noticed the odd exception handling and returning arrays and stuff, but fixing this is not a bugfix. |
If the symlink could not be created but exists, check if it points to
the expected target and ignore the error in that case.
Fixes #2667