X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e2a6f23364aefcd5095dc6558e3ab8144363fa96..f861258fcace51a1aaba2f31c7498b3ba9e31371:/src/generic/helphtml.cpp?ds=sidebyside diff --git a/src/generic/helphtml.cpp b/src/generic/helphtml.cpp index 228b436b11..f2055a19df 100644 --- a/src/generic/helphtml.cpp +++ b/src/generic/helphtml.cpp @@ -96,7 +96,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile) file = ifile; if(! wxIsAbsolutePath(file)) { - char* f = wxGetWorkingDirectory(); + wxChar* f = wxGetWorkingDirectory(); file = f; delete[] f; // wxGetWorkingDirectory returns new memory file << WXEXTHELP_SEPARATOR << ifile; @@ -115,6 +115,15 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile) newfile << WXEXTHELP_SEPARATOR << wxGetLocale()->GetName(); if(wxDirExists(newfile)) file = newfile; + else + { + newfile = WXEXTHELP_SEPARATOR; + const wxChar *cptr = wxGetLocale()->GetName().c_str(); + while(*cptr && *cptr != _T('_')) + newfile << *(cptr++); + if(wxDirExists(newfile)) + file = newfile; + } } if(! wxDirExists(file)) @@ -132,7 +141,7 @@ wxHTMLHelpControllerBase::LoadFile(const wxString& ifile) m_MapList = new wxList; m_NumOfEntries = 0; - FILE *input = fopen(mapFile.c_str(),"rt"); + FILE *input = fopen(mapFile.fn_str(),"rt"); if(! input) return FALSE; do