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

preserve trailing back-slashes in NativePath #2079

Merged
merged 1 commit into from
Feb 24, 2018

Conversation

MartinNowak
Copy link
Contributor

@MartinNowak MartinNowak commented Feb 22, 2018

Slash behavior originally introduced here 970a022#diff-3620332feace439ec637b023bc2e7a01R262, and apparently broken here 344fe34#diff-47d6be40e29a186df00d5f3bfad92671R36.

The weird usage of Path for URLs and file paths on Windows makes this difficult to handle properly (though / and \ usage should be mut-ex IIRC). No idea how much impact this breaking change would have. Any suggestion for a better migration path?

@s-ludwig
Copy link
Member

This is why there are three default path types in vibe-core (WindowsPath, PosixPath and InetPath). This conflation was a really bad idea, one that std.path also suffers from.

It should be m_endsWithSlash |= pathstr.endsWith('\\'); though, so that a trailing slash is also still allowed on Windows.

@MartinNowak
Copy link
Contributor Author

It should be m_endsWithSlash |= pathstr.endsWith('\'); though, so that a trailing slash is also still allowed on Windows.

Of course 🙄, done.

@s-ludwig s-ludwig merged commit 6355542 into vibe-d:master Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants