From 067e21046fdbfaed37ce2bb72b2945f5e2549399 Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Wed, 14 Nov 2007 23:30:13 +0000 Subject: [PATCH] Fix bug that files with nonascii filenames are always reported as externally modified. * src/Buffer.cpp (Buffer::readFile): filenames are always stored as UTF-8 in the FileName class. * src/support/FileName.h: correct comment. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21620 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 2 +- src/support/FileName.h | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 580e1023b6..9817c47e5b 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -762,7 +762,7 @@ Buffer::ReadStatus Buffer::readFile(Lexer & lex, FileName const & filename, // Save the timestamp and checksum of disk file. If filename is an // emergency file, save the timestamp and sum of the original lyx file // because isExternallyModified will check for this file. (BUG4193) - string diskfile = filename.toFilesystemEncoding(); + string diskfile = filename.absFilename(); if (suffixIs(diskfile, ".emergency")) diskfile = diskfile.substr(0, diskfile.size() - 10); saveCheckSum(FileName(diskfile)); diff --git a/src/support/FileName.h b/src/support/FileName.h index a2b1c3c48d..80db2ed35a 100644 --- a/src/support/FileName.h +++ b/src/support/FileName.h @@ -113,9 +113,7 @@ public: protected: - /// The absolute file name. - /// The encoding is currently unspecified, anything else than ASCII - /// may or may not work. + /// The absolute file name in UTF-8 encoding. std::string name_; };