
Hi All! I have noticed that fs::path("/foo/boo/.").normalize == fs::path("/foo/boo/.") and but I expect fs::path("/foo/boo/.").normalize == fs::path("/foo/boo") without trailing dot. I there is a reason why trailing dot is not removed? Is that paths is not equivalents on some systems?

Konstantin Litvinenko пишет:
Hi All!
I have noticed that
fs::path("/foo/boo/.").normalize == fs::path("/foo/boo/.")
and but I expect
fs::path("/foo/boo/.").normalize == fs::path("/foo/boo")
without trailing dot. I there is a reason why trailing dot is not removed? Is that paths is not equivalents on some systems?
Ok, I have answered this question by my self :) Yes, this paths is not equivalents in POSIX systems because of symbolic links resolutions. I can handle this. But second question arises. Why fs::path::normalize() is deprecated? Why users should perform this non trivial function by hands?
participants (1)
-
Konstantin Litvinenko