From: Vadim Zeitlin Date: Fri, 23 Aug 2013 16:37:09 +0000 (+0000) Subject: Fix wxHtmlHelpData::SetTempDir() to behave correctly without trailing slash. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0d53638f7147c18153f63fdfc096b17be6e22a27?ds=sidebyside Fix wxHtmlHelpData::SetTempDir() to behave correctly without trailing slash. The path passed to this function is always a directory, so use wxFileName::AssignDir() instead of the default constructor of wxFileName which considers the name to be a name of a file unless it ends with a path separator. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74696 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/stc/stctest.cpp b/samples/stc/stctest.cpp index ab2dcea848..b42bda52d8 100644 --- a/samples/stc/stctest.cpp +++ b/samples/stc/stctest.cpp @@ -555,7 +555,7 @@ void AppFrame::CreateMenu () // Help menu wxMenu *menuHelp = new wxMenu; - menuHelp->Append (wxID_ABOUT, _("&About ..\tShift+F1")); + menuHelp->Append (wxID_ABOUT, _("&About ..\tCtrl+D")); // construct menu m_menuBar->Append (menuFile, _("&File")); diff --git a/src/html/helpdata.cpp b/src/html/helpdata.cpp index 6db3bc5c65..c60c74e626 100644 --- a/src/html/helpdata.cpp +++ b/src/html/helpdata.cpp @@ -474,7 +474,8 @@ void wxHtmlHelpData::SetTempDir(const wxString& path) m_tempPath = path; else { - wxFileName fn(path); + wxFileName fn; + fn.AssignDir(path); fn.MakeAbsolute(); m_tempPath = fn.GetPath(wxPATH_GET_VOLUME | wxPATH_GET_SEPARATOR);