Account for unicode chars in tempdir path on Windows

This commit is contained in:
Enrico Forestieri 2017-03-28 12:05:52 +02:00
parent 31cd421bcd
commit a5377ead20
2 changed files with 2 additions and 2 deletions

View File

@ -1313,7 +1313,7 @@ Buffer::ReadStatus Buffer::convertLyXFormat(FileName const & fn,
command << os::python()
<< ' ' << quoteName(lyx2lyx.toFilesystemEncoding())
<< " -t " << convert<string>(LYX_FORMAT)
<< " -o " << quoteName(tmpfile.toFilesystemEncoding())
<< " -o " << quoteName(tmpfile.toSafeFilesystemEncoding())
<< ' ' << quoteName(fn.toSafeFilesystemEncoding());
string const command_str = command.str();

View File

@ -30,7 +30,7 @@ namespace {
template<typename OFStream>
bool doOpenFileWrite(OFStream & ofs, FileName const & fname)
{
ofs.open(fname.toFilesystemEncoding().c_str());
ofs.open(fname.toSafeFilesystemEncoding(os::CREATE).c_str());
if (ofs)
return true;
docstring const file = fname.displayName(50);