git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5667
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+
+static wxString SafeFileName(const wxString& s)
+{
+ wxString res(s);
+ res.Replace(wxT("#"), wxT("_"));
+ res.Replace(wxT(":"), wxT("_"));
+ res.Replace(wxT("\\"), wxT("_"));
+ res.Replace(wxT("/"), wxT("_"));
+ return res;
+}
+
bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
wxFontEncoding encoding,
const wxString& title, const wxString& contfile,
bool wxHtmlHelpData::AddBookParam(const wxFSFile& bookfile,
wxFontEncoding encoding,
const wxString& title, const wxString& contfile,
if (m_TempPath != wxEmptyString)
{
wxFileOutputStream *outs = new wxFileOutputStream(m_TempPath +
if (m_TempPath != wxEmptyString)
{
wxFileOutputStream *outs = new wxFileOutputStream(m_TempPath +
- wxFileNameFromPath(bookfile.GetLocation()) + wxT(".cached"));
+ SafeFileName(wxFileNameFromPath(bookfile.GetLocation())) + wxT(".cached"));
SaveCachedBook(bookr, outs);
delete outs;
}
SaveCachedBook(bookr, outs);
delete outs;
}