* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
- * \author Lars Gullik Bjønnes
+ * \author Lars Gullik Bjønnes
*
* Full author contact details are available in file CREDITS.
*/
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);
return false;
}
-}
+} // namespace
bool openFileWrite(ofstream & ofs, FileName const & fname)
}
-bool openFileWrite(odocfstream & ofs, FileName const & fname)
+bool openFileWrite(ofdocstream & ofs, FileName const & fname)
{
return doOpenFileWrite(ofs, fname);
}