-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix LSP File watching so it correctly reports the baseUri if there's a trailing slash #73203
Conversation
src/Features/LanguageServer/Protocol/Extensions/ProtocolConversions.cs
Outdated
Show resolved
Hide resolved
// found at https://github.com/microsoft/vscode/blob/9e1974682eb84eebb073d4ae775bad1738c281f6/src/vscode-dts/vscode.d.ts#L2226 | ||
// the baseUri should not end in a trailing separator, nor should it | ||
// have any relative segmeents (., ..) | ||
if (path[^1] == System.IO.Path.DirectorySeparatorChar) |
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.
every time we hand write some file path code, i die inside. :)
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.
Me too... me too
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.
"".TrimEnd ?
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.
get out of here with your sense and logic. TBH I was just trying to avoid any allocations but I'm guessing trimend will be efficient enough
@CyrusNajmabadi or @dibarbet PTAL |
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.
thanks for the tests!
No description provided.