Skip to content

Commit a989595

Browse files
committed
use getCanonicalFileName on path fragments as in other utility methods
1 parent 3fd9eb5 commit a989595

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/compiler/program.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -919,9 +919,8 @@ namespace ts {
919919
return;
920920
}
921921

922-
const caseSensitive = host.useCaseSensitiveFileNames();
923922
for (let i = 0, n = Math.min(commonPathComponents.length, sourcePathComponents.length); i < n; i++) {
924-
if (caseSensitive ? commonPathComponents[i] !== sourcePathComponents[i] : commonPathComponents[i].toLocaleLowerCase() !== sourcePathComponents[i].toLocaleLowerCase()) {
923+
if (getCanonicalFileName(commonPathComponents[i]) !== getCanonicalFileName(sourcePathComponents[i])) {
925924
if (i === 0) {
926925
// Failed to find any common path component
927926
return true;

0 commit comments

Comments
 (0)