From f4787aa9c95ca45d46e04513356b61860ac72ea2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Peter=20K=C3=BCmmel?= Date: Sun, 5 Oct 2008 12:08:21 +0000 Subject: [PATCH] Use long path names when comparing FileNames git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26745 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/support/FileName.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 8e51a4a92e..cde0c145ae 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -916,12 +916,15 @@ docstring const FileName::relPath(string const & path) const } -bool operator==(FileName const & lhs, FileName const & rhs) +bool operator==(FileName const & l, FileName const & r) { - // FIXME: We need to solve this warning from Qt documentation: + // FIXME: In future use Qt. + // Qt 4.4: We need to solve this warning from Qt documentation: // * Long and short file names that refer to the same file on Windows are // treated as if they referred to different files. // This is supposed to be fixed for Qt5. + FileName const lhs(os::internal_path(l.absFilename())); + FileName const rhs(os::internal_path(r.absFilename())); if (lhs.empty()) // QFileInfo::operator==() returns false if the two QFileInfo are empty. -- 2.39.2