I want to check whether two paths are to the same file/directory with Boost.Filesystem.
For example, "/bin" and "/./bin" are to the same directory, but the following code doesn't work as intended.
namespace fs = boost::filesystem;
fs::path p1{"/bin"}, p2{"/./bin"};
if(p1 == p2){
std::cout << "Equal" << std::endl;
}else{
std::cout << "Not equal" << std::endl;
}
The output of this is "Not equal".
How can I check whether two paths are to the same file/directory? Could you tell me this?
Thanks.