From: Richard Heck Date: Tue, 29 Jul 2008 18:16:05 +0000 (+0000) Subject: Refresh before checking for equality. Solves problem noted by Bennett. X-Git-Tag: 1.6.10~3799 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1b7b9e4980f2ed1b0201042a2cfd7d9d8536dc02;p=features.git Refresh before checking for equality. Solves problem noted by Bennett. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25989 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/Converter.cpp b/src/Converter.cpp index 111aa92c28..ab7e51f912 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -352,7 +352,7 @@ bool Converters::convert(Buffer const * buffer, // if input and output files are equal, we use a // temporary file as intermediary (JMarc) FileName real_outfile; - if (outfile.absFilename() == infile.absFilename()) { + if (outfile == infile) { real_outfile = infile; // when importing, a buffer does not necessarily exist if (buffer) diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index e0a6271c23..bf675c9a6e 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -814,6 +814,9 @@ bool operator==(FileName const & lhs, FileName const & rhs) // FIXME: 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. + lhs.d->refresh(); + rhs.d->refresh(); + if (!lhs.d->fi.isSymLink() && !rhs.d->fi.isSymLink()) return lhs.d->fi == rhs.d->fi;