Ignore drive letters when comparing casings of the files with forceConsistentCasingInFileNames - #31503
Merged
Merged
Conversation
…nsistentCasingInFileNames Fixes #31327
Andrew Branch (andrewbranch)
approved these changes
May 21, 2019
|
|
||
| function getPathWithoutRoot(pathComponents: ReadonlyArray<string>) { | ||
| if (pathComponents.length === 0) return ""; | ||
| return pathComponents.slice(1).join(directorySeparator); |
There was a problem hiding this comment.
So pathComponents[0] is always / on *nix systems, and e.g. C:/ on Windows, right?
Member
Author
There was a problem hiding this comment.
Yes
mihailik
reviewed
May 23, 2019
| 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: |
Contributor
There was a problem hiding this comment.
Is it??
C:\file is indeed the same as c:\file — but it is most definitely NOT the same as D:\file.
Looking at the use below the code will wrongly assume C:\file match D:\file.
Member
Author
There was a problem hiding this comment.
That's guaranteed to be match because the file was found by its name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #31327