mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-11-18 20:11:14 +00:00
Ignore drive letters when comparing casings of the files with forceConsistentCasingInFileNames
Fixes #31327
This commit is contained in:
1 parent
9052804576
commit
db150517d7
3 files changed
+29
-2
No files matched your search
@@ -2232,7 +2232,10 @@ namespace ts {
|
||||
if (isRedirect) {
|
||||
inputName = getProjectReferenceRedirect(fileName) || fileName;
|
||||
}
|
||||
if (getNormalizedAbsolutePath(checkedName, currentDirectory) !== getNormalizedAbsolutePath(inputName, currentDirectory)) {
|
||||
// Check if it differs only in drive letters its ok to ignore that error:
|
||||
const checkedAbsolutePath = getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory);
|
||||
const inputAbsolutePath = getNormalizedAbsolutePathWithoutRoot(inputName, currentDirectory);
|
||||
if (checkedAbsolutePath !== inputAbsolutePath) {
|
||||
reportFileNamesDifferOnlyInCasingError(inputName, checkedName, refFile, refPos, refEnd);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user