path::lexically_normal() behaves slightly differently from the standard #33
Labels
available on master
Fix is done on master branch, issue closed on next release
bug
Something isn't working
Milestone
Hi!
First of all, thank you for this library!
Describe the bug
I'm trying to use this library as a fallback when the compiler does not support the final standard version of
<filesystem>
library.However, I've found that in some cases the result returned by
path::lexically_normal()
of ghc is different from the one returned by the C++17 standard version.In particular, the normal version of
path("../")
should be".."
, while ghc retains the trailing'/'
(eventually converted to'\\'
on Windows).On Windows, the same applies also to
path("..\\")
, which should be normalized to".."
and instead still retains the trailing'\\'
.To Reproduce
To reproduce the behavior, I've created a small program to compare the different results between
ghc::filesystem
andstd::filesystem
:I've tested the program using various compilers and operating systems.
On Windows 10 using
the program output is:
On Ubuntu 18.04 LTS using
the program output is:
Expected behavior
In all these cases
path::lexically_normal()
of ghc should return apath("..")
in order to conform to the standard.External References
The text was updated successfully, but these errors were encountered: