From 9bdb4a2f700bc8d9846315acbf25db150c9f4d82 Mon Sep 17 00:00:00 2001 From: Matt Bierner Date: Thu, 5 Dec 2019 15:05:35 -0800 Subject: [PATCH] Handle normalized windows paths in resource map Fixes #86433 During path normalization, we convert `\` in windows paths to `/`. This causes the isWindowsPath check to fail I think it is generally safe to assume that file paths that start with a drive letter and then any type of slash should be treated as windows paths --- .../typescript-language-features/src/utils/resourceMap.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/typescript-language-features/src/utils/resourceMap.ts b/extensions/typescript-language-features/src/utils/resourceMap.ts index a10fbd91636..e942fae4583 100644 --- a/extensions/typescript-language-features/src/utils/resourceMap.ts +++ b/extensions/typescript-language-features/src/utils/resourceMap.ts @@ -101,5 +101,5 @@ export class ResourceMap { } export function isWindowsPath(path: string): boolean { - return /^[a-zA-Z]:\\/.test(path); + return /^[a-zA-Z]:[\/\\]/.test(path); }