X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FChktex.C;h=981999f303fb0c5b33275982cabc356d824e91ae;hb=8765ab59cdddad67284007813ef25934ea0042ce;hp=09c48a7eabe1a45963a5e7d861c3439839d6df72;hpb=ef91176cbf85439821736dbe16e748745c65a977;p=lyx.git diff --git a/src/Chktex.C b/src/Chktex.C index 09c48a7eab..981999f303 100644 --- a/src/Chktex.C +++ b/src/Chktex.C @@ -27,13 +27,14 @@ 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) @@ -62,7 +63,9 @@ int Chktex::scanLogFile(TeXErrors & terr) { 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 msg(_("ChkTeX warning id # %1$d")); @@ -72,7 +75,7 @@ int Chktex::scanLogFile(TeXErrors & terr) 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;