Skip to content

Fix bug in normalizeAndPreserveTrailingSlash: For "./", return "", not "/" (#21704) #21726

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

Merged
2 commits merged into from
Feb 7, 2018

Conversation

ghost
Copy link

@ghost ghost commented Feb 7, 2018

Port of #21704

@@ -455,7 +455,13 @@ namespace ts.Completions.PathCompletions {
}

function normalizeAndPreserveTrailingSlash(path: string) {
return hasTrailingDirectorySeparator(path) ? ensureTrailingDirectorySeparator(normalizePath(path)) : normalizePath(path);
if (path === "./") {
Copy link
Member

Choose a reason for hiding this comment

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

Dont you need to do this check on normalizeSlashes(path)

@ghost ghost mentioned this pull request Feb 7, 2018
@ghost ghost merged commit 4d04fa9 into release-2.7 Feb 7, 2018
@ghost ghost deleted the release-2.7_normalizeAndPreserveTrailingSlash branch February 7, 2018 18:27
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant