Move URL<->filename conversion functions to wxFileName

This ensures that they are always available and can be used in
wxLaunchDefaultBrowser() in all build variants, whereas before this
function didn't handle file:// URLs correctly when the library was built
with wxUSE_FILESYSTEM==0.

Closes https://github.com/wxWidgets/wxWidgets/pull/1469

Closes #10414.
This commit is contained in:
oneeyeman1
2019-08-24 00:49:25 -05:00
committed by Vadim Zeitlin
parent 5e7b515349
commit 14bcf09924
8 changed files with 133 additions and 100 deletions

View File

@@ -1360,7 +1360,7 @@ void wxWebViewIE::onActiveXEvent(wxActiveXEvent& evt)
if(m_historyEnabled && !m_historyLoadingFromList &&
(url == GetCurrentURL() ||
(GetCurrentURL().substr(0, 4) == "file" &&
wxFileSystem::URLToFileName(GetCurrentURL()).GetFullPath() == url)))
wxFileName::URLToFileName(GetCurrentURL()).GetFullPath() == url)))
{
//If we are not at the end of the list, then erase everything
//between us and the end before adding the new page