Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proper parsing/emitting of Windows style paths #208

Merged

Conversation

EdSchouten
Copy link
Member

This PR is identical to #206, but with the review comments addressed.

Fixes: #206

@EdSchouten EdSchouten force-pushed the feature/implement-windows-parser-and-on-drive-letter branch 2 times, most recently from ba97988 to 59ef57e Compare June 21, 2024 20:16
EdSchouten and others added 2 commits June 21, 2024 22:26
Bazel on my Mac seems to insert a couple more entries into this file.
To give better error messages for which file or directory operation
fails.
@EdSchouten EdSchouten force-pushed the feature/implement-windows-parser-and-on-drive-letter branch 5 times, most recently from 48cf1ee to d606e37 Compare June 21, 2024 20:54
@EdSchouten EdSchouten force-pushed the feature/implement-windows-parser-and-on-drive-letter branch from d606e37 to 3e6ca8c Compare June 21, 2024 21:02
EdSchouten and others added 4 commits June 21, 2024 23:25
It's really annoying that these functions can return errors. Especially
because functions like path.Resolve() can also fail. Let's just make it
so that these functions always return a parser. We can move the null
byte check into ParseScope() to achieve what we want.
This method doesn't take a pointer receiver, so mutating rp.path is
pointless.
We can simply compare 'remainder' against nil. Doing this makes it more
explicit that we don't need to return the remainder in the GotSymlink
case.
@EdSchouten EdSchouten force-pushed the feature/implement-windows-parser-and-on-drive-letter branch from 3e6ca8c to facdefe Compare June 21, 2024 21:25
@EdSchouten EdSchouten merged commit c56dbb3 into master Jun 22, 2024
1 check passed
@EdSchouten EdSchouten deleted the feature/implement-windows-parser-and-on-drive-letter branch June 22, 2024 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant