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

Projects
None yet
2 participants
@MartinNowak
Contributor

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

This comment has been minimized.

Member

s-ludwig commented Feb 22, 2018

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

This comment has been minimized.

Contributor

MartinNowak commented Feb 23, 2018

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 added the auto-merge label Feb 24, 2018

@s-ludwig s-ludwig merged commit 6355542 into vibe-d:master Feb 24, 2018

1 of 3 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
continuous-integration/appveyor/pr AppVeyor build failed
Details
codecov/patch 100% of diff hit (target 58.841%)
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment