utility: fixed sorting of FilePaths in STL containers

This commit is contained in:
Eberhard Graether
2015-03-24 23:57:43 +01:00
parent eb9092a07f
commit 07ca387326
+5
View File
@@ -75,5 +75,10 @@ bool FilePath::operator!=(const FilePath& other) const
bool FilePath::operator<(const FilePath& other) const
{
if (exists() && other.exists())
{
return boost::filesystem::canonical(m_path).compare(boost::filesystem::canonical(other.m_path)) < 0;
}
return boost::filesystem::absolute(m_path).compare(boost::filesystem::absolute(other.m_path)) < 0;
}