From d35d5d07937ff5114728a0682b38f7960c59034c Mon Sep 17 00:00:00 2001 From: Andy Date: Wed, 7 Feb 2018 10:50:49 -0800 Subject: [PATCH] Fix bug: Check for both "./" and ".\" (#21730) * Fix bug: Check for both "./" and ".\" * Use normalizeSlashes --- src/services/pathCompletions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/pathCompletions.ts b/src/services/pathCompletions.ts index 0dfae889747..fd639aef817 100644 --- a/src/services/pathCompletions.ts +++ b/src/services/pathCompletions.ts @@ -462,7 +462,7 @@ namespace ts.Completions.PathCompletions { } function normalizeAndPreserveTrailingSlash(path: string) { - if (path === "./") { + if (normalizeSlashes(path) === "./") { // normalizePath turns "./" into "". "" + "/" would then be a rooted path instead of a relative one, so avoid this particular case. // There is no problem for adding "/" to a non-empty string -- it's only a problem at the beginning. return "";