File names must be compared taking into account filesystem case sensitivity,

otherwise the same file could be opened in different buffers by simply
changing the case of a character in the name.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29538 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Enrico Forestieri 2009-05-04 22:16:37 +00:00
parent 92b4d6d431
commit 6e7031dc5a

View File

@ -999,7 +999,10 @@ bool equivalent(FileName const & l, FileName const & r)
bool operator==(FileName const & lhs, FileName const & rhs)
{
return lhs.absFilename() == rhs.absFilename();
return os::isFilesystemCaseSensitive()
? lhs.absFilename() == rhs.absFilename()
: !QString::compare(toqstr(lhs.absFilename()),
toqstr(rhs.absFilename()), Qt::CaseInsensitive);
}