Skip to content

Commit f8c10ff

Browse files
committed
Merge pull request #3117 from Microsoft/normalizedSlashesInFilenames
program should store file names with normalized slashes
2 parents 3480119 + 947d4a2 commit f8c10ff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compiler/program.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ module ts {
238238
}
239239

240240
function getSourceFile(fileName: string) {
241-
fileName = host.getCanonicalFileName(fileName);
241+
fileName = host.getCanonicalFileName(normalizeSlashes(fileName));
242242
return hasProperty(filesByName, fileName) ? filesByName[fileName] : undefined;
243243
}
244244

@@ -357,7 +357,7 @@ module ts {
357357

358358
// Get source file from normalized fileName
359359
function findSourceFile(fileName: string, isDefaultLib: boolean, refFile?: SourceFile, refStart?: number, refLength?: number): SourceFile {
360-
let canonicalName = host.getCanonicalFileName(fileName);
360+
let canonicalName = host.getCanonicalFileName(normalizeSlashes(fileName));
361361
if (hasProperty(filesByName, canonicalName)) {
362362
// We've already looked for this file, use cached result
363363
return getSourceFileFromCache(fileName, canonicalName, /*useAbsolutePath*/ false);

0 commit comments

Comments
 (0)