-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Remove invalid symlinks when linking plugin assets #19160
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
Conversation
markstory
left a comment
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.
Looks good, but the test may need adjusting for windows.
cffcf10 to
b770ddc
Compare
|
it seems file_exists returns true for a symlink on windows when the target doesn't exist even though the documentation says otherwise. We'd need a more elaborate check. |
|
Thats a windows specific issue as a broken symlink is still a "file" for windows. |
|
Are you sure readlink returns false on windows? |
|
Its not primarily about
|
|
I plan to add a more complete check that the symlink points to the right target. |
b770ddc to
99b4068
Compare
99b4068 to
7868ef5
Compare
|
@markstory @LordSimal Did a more general check and logic. |
| rmdir($fakeTarget); | ||
|
|
||
| $this->assertFileDoesNotExist($fakeTarget); | ||
| $this->assertTrue(is_link($path)); |
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.
Only check the link still exists as file_exists behaves differently on linux and windows for a disconnected link.
closes #19142