namespace lyx {
using support::changeExtension;
+using support::FileName;
+using support::makeAbsPath;
using support::onlyFilename;
using support::split;
using support::Systemcall;
using std::getline;
using std::string;
-using std::ifstream;
Chktex::Chktex(string const & chktex, string const & f, string const & p)
{
int retval = 0;
- string const tmp = onlyFilename(changeExtension(file, ".log"));
+ // FIXME: Find out whether onlyFilename() is really needed,
+ // or whether makeAbsPath(onlyFilename()) is a noop here
+ FileName const tmp(makeAbsPath(onlyFilename(changeExtension(file, ".log"))));
#if USE_BOOST_FORMAT
boost::basic_format<char_type> msg(_("ChkTeX warning id # %1$d"));
docstring token;
// FIXME UNICODE
// We have no idea what the encoding of the error file is
- idocfstream ifs(tmp.c_str());
+ idocfstream ifs(tmp.toFilesystemEncoding().c_str());
while (getline(ifs, token)) {
docstring srcfile;
docstring line;