Opened 6 years ago

Last modified 6 years ago

#12743 new Bugs

boost::filesystem in Windows fails to compare two identical paths with different case

Reported by: diecalt@… Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

boost::filesystem::path a = "E:
temp
One"; boost::filesystem::path b = "E:
Temp
One";

if (a == b) {

std::cout << "Paths are identical" << std::endl;

} else {

std::cout << "Paths are different" << std::endl;

}

This code prints "Paths are different".

Change History (3)

comment:1 by anonymous, 6 years ago

Formatted Code:

	boost::filesystem::path a = "e:\\Temp\\One";
	boost::filesystem::path b = "E:\\Temp\\One";

	if (a == b)
	{
		std::cout << "Paths are identical" << std::endl;
	}
	else
	{
		std::cout << "Paths are identical" << std::endl;
	}

comment:2 by John Maddock, 6 years ago

Component: Nonefilesystem
Owner: set to Beman Dawes

comment:3 by anonymous, 6 years ago

Also an issue on windows during

fs::relative("d:\1\1\1.txt", "D:\1\2");
Note: See TracTickets for help on using tickets.