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

Wrong result from stem/filename/extension when the ':' character is present in the filename #156

Closed
petersjogren opened this issue Sep 2, 2022 · 2 comments
Assignees
Labels
available on master Fix is done on master branch, issue closed on next release bug Something isn't working POSIX POSIX type backend is affected
Milestone

Comments

@petersjogren
Copy link

petersjogren commented Sep 2, 2022

I suspect that this is a bug. std::filesystem behaves as expected but ghc::filesystem does not behave as expected (see below).

On Mac with ghc::filesystem:
A path with the filename "t:est.txt"

extension() returns "". Expected: ".txt"
filename() returns "t:". Expected: "t:est.txt"
stem() returns "t:". Expected: "t:est"

These tests all fail:
CHECK(fs::path("t:est.txt").extension() == ".txt");
CHECK(fs::path("t:est.txt").filename() == "t:est.txt");
CHECK(fs::path("t:est.txt").stem() == "t:est");

@gulrak
Copy link
Owner

gulrak commented Sep 6, 2022

Oh, that is unexpected, indeed. I'll look into it.

@gulrak gulrak self-assigned this Sep 6, 2022
@gulrak gulrak added the bug Something isn't working label Sep 6, 2022
@gulrak gulrak added this to the v1.5.14 milestone Sep 6, 2022
@gulrak gulrak added the POSIX POSIX type backend is affected label Sep 6, 2022
@gulrak gulrak added the available on master Fix is done on master branch, issue closed on next release label Mar 2, 2023
@gulrak
Copy link
Owner

gulrak commented Mar 5, 2023

Released with v1.5.14.

@gulrak gulrak closed this as completed Mar 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available on master Fix is done on master branch, issue closed on next release bug Something isn't working POSIX POSIX type backend is affected
Projects
None yet
Development

No branches or pull requests

2 participants