Fixed a case where a schema path with unix paths (/) would cause the schema file to be added twice on windows machines #7505
+13
−7
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.
Summary of the changes (Less than 80 chars)
This is a really subtle bug.
If the schema file contains a
schema
path that contains a unix/
. And the schema file happens to be part of theinclude
documents path.Then you get the same schema file twice, (because the string is different as far as the hashset is concerned). Which the reports many duplicate schema errors when trying to generate a client.
GetFullPath
will essentially normalize the path for the current operating system.Note:
I don't know if the new
[]
syntax causes any issues (I don't think so) but let me know if that needs to change.Seems to be caused by to: #7368
Closes #bugnumber (in this specific format)
Not sure.