-
Notifications
You must be signed in to change notification settings - Fork 25.6k
More robust checking of parent path on Windows #123255
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
More robust checking of parent path on Windows #123255
Conversation
|
Pinging @elastic/es-core-infra (Team:Core/Infra) |
ldematte
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.
LGTM
| if (ndx < -1) { | ||
| String maybeParent = paths[-ndx - 2]; | ||
| return path.startsWith(maybeParent) && path.startsWith(FILE_SEPARATOR, maybeParent.length()); | ||
| // Normalization on Windows does not allways remove trailing backslashes, we need to check both patterns |
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.
Not important, but there is a little spelling mistake (always)
prdoyle
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.
If the issue is trailing dir separators, I think we ought to remove them in our normalization, rather than tolerate them in the checks.
|
The ironic thing is, |
|
I just tried reimplementing |
|
@prdoyle where are we with this? Sounds like this PR can be closed, right? |
|
obsolete, fixed as part of #123291 |
No description provided.