From 5320ce25528e27612116d0063c11ed702964bef8 Mon Sep 17 00:00:00 2001 From: uniqueiniquity Date: Tue, 16 Jan 2018 17:04:14 -0800 Subject: [PATCH] Revert path normalization in favor of checking for backslash --- src/compiler/core.ts | 2 +- src/compiler/program.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 0faabbda2a0..d92a02661e8 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1909,7 +1909,7 @@ namespace ts { return p2 + 1; } if (path.charCodeAt(1) === CharacterCodes.colon) { - if (path.charCodeAt(2) === CharacterCodes.slash) return 3; + if (path.charCodeAt(2) === CharacterCodes.slash || path.charCodeAt(2) === CharacterCodes.backslash) return 3; } // Per RFC 1738 'file' URI schema has the shape file:/// // if is omitted then it is assumed that host value is 'localhost', diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 8f3cadcddc5..0d1bbf233a3 100755 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -15,8 +15,7 @@ namespace ts { export function resolveTripleslashReference(moduleName: string, containingFile: string): string { const basePath = getDirectoryPath(containingFile); - const normalizedModuleName = normalizePath(moduleName); - const referencedFileName = isRootedDiskPath(normalizedModuleName) ? normalizedModuleName : combinePaths(basePath, normalizedModuleName); + const referencedFileName = isRootedDiskPath(moduleName) ? moduleName : combinePaths(basePath, moduleName); return normalizePath(referencedFileName); }