Fix SimpleRelativePathHelper stripping first character when working directory is slash - #6646
Open
liamduckett wants to merge 3 commits into
Open
liamduckett wants to merge 3 commits into
liamduckett wants to merge 3 commits into
Conversation
Author
|
Failures look unrelated? |
Contributor
|
github reports this branch is 2284 commits behind the PR target-branch |
staabm
reviewed
Oct 1, 2026
staabm
reviewed
Oct 1, 2026
…g directory is a slash
Author
My bad, looks like my fork was still tracking 2.1.x... should be resolved now! |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hey, fixes #3579.
My understanding of the problem, is that this code was written to deal with working directories without a leading slash. This is the case almost all of the time, as the working directory is normalized to remove such. The one exception is when working from the root directory (
/) as removing the leading slash would result in an empty string (which has different semantic meaning).There is another instance of this bug in
SystemAgnosticSimpleRelativePathHelperhowever I have left it our of this PR as it’s usage looks a little more involved (which would make it harder for me to write tests for). Happy to investigate if desired?Does not attempt to fix the “CWD partial match” described in #52 (comment) as this feels like a separate issue. Happy to pick up here if desired?
Relates to: