using support::ascii_lowercase;
using support::bformat;
using support::expandPath;
+using support::FileName;
using support::getEnv;
using support::libFileSearch;
using support::token;
} // namespace anon
-int LyXRC::read(string const & filename)
+int LyXRC::read(FileName const & filename)
{
LyXLex lexrc(lyxrcTags, lyxrcCount);
if (lyxerr.debugging(Debug::PARSER))
switch (static_cast<LyXRCTags>(le)) {
case RC_INPUT: // Include file
if (lexrc.next()) {
- string const tmp =
+ FileName const tmp =
libFileSearch(string(),
lexrc.getString());
if (read(tmp)) {
lexrc.printError("Error reading "
- "included file: "+tmp);
+ "included file: " + tmp.absFilename());
}
}
break;
}
-void LyXRC::write(string const & filename, bool ignore_system_lyxrc) const
+void LyXRC::write(FileName const & filename, bool ignore_system_lyxrc) const
{
- ofstream ofs(filename.c_str());
+ ofstream ofs(filename.toFilesystemEncoding().c_str());
if (ofs)
write(ofs, ignore_system_lyxrc);
}
case RC_CONVERTER_CACHE_MAXAGE:
if (ignore_system_lyxrc ||
converter_cache_maxage != system_lyxrc.converter_cache_maxage) {
- os << "\\converter_cache_maxage"
+ os << "\\converter_cache_maxage "
<< converter_cache_maxage << '\n';
}