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
This commit is contained in:
Enrico Forestieri 2007-11-14 23:30:13 +00:00
parent a3393e63b8
commit 067e21046f
2 changed files with 2 additions and 4 deletions

View File

@ -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));

View File

@ -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_;
};