From d9bd31fc5288577100718c2d2278705b12dd0342 Mon Sep 17 00:00:00 2001 From: zhengbli Date: Mon, 20 Jun 2016 12:39:07 -0700 Subject: [PATCH] Use getCanonicalFileName --- src/compiler/utilities.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index f4b9592043e..b4ef62c6c3e 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -2331,7 +2331,7 @@ namespace ts { export function getSourceFilePathInNewDir(sourceFile: SourceFile, host: EmitHost, newDirPath: string) { let sourceFilePath = getNormalizedAbsolutePath(sourceFile.fileName, host.getCurrentDirectory()); const commonSourceDirectory = host.getCommonSourceDirectory(); - const isSourceFileInCommonSourceDirectory = sourceFilePath.toLowerCase().indexOf(commonSourceDirectory.toLowerCase()) === 0; + const isSourceFileInCommonSourceDirectory = host.getCanonicalFileName(sourceFilePath).indexOf(host.getCanonicalFileName(commonSourceDirectory)) === 0; sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath; return combinePaths(newDirPath, sourceFilePath); }