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

Fix last character of path prefix being deleted #5

Merged
merged 2 commits into from Jan 15, 2021
Merged

Fix last character of path prefix being deleted #5

merged 2 commits into from Jan 15, 2021

Conversation

deadalusai
Copy link
Contributor

@deadalusai deadalusai commented Jan 15, 2021

This commit fixes a bug where the last letter of some verbatim prefixes are
deleted if there are no more following path components.

E.g. given the path \\?\UNC\server\share to_slash would produce \\?\UNC\server\shar.
Or more commonly C: would produce C.

I've added unit test coverage for some of the various Windows verbatim prefixes.

This commit fixes a bug where the last letter of some verbatim prefixes are
deleted if there are no more following path components.

E.g. given the path `\\?\UNC\server\share` to_slash would produce
`\\?\UNC\server\shar`.
@rhysd
Copy link
Owner

rhysd commented Jan 15, 2021

Ohh, I misunderstood the spec of file path prefixes. Thank you for catching this!

@rhysd
Copy link
Owner

rhysd commented Jan 15, 2021

And thank you for adding new test cases. That's super helpful!

@rhysd rhysd merged commit 68a2f2e into rhysd:master Jan 15, 2021
@deadalusai deadalusai deleted the master--fix-trailing-prefix-character branch January 15, 2021 20:20
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

2 participants