X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7011055c55538a9f38bc265bbafab4afa3ae2981..87f0b1323b7ac77f02133b836c8dfee63b0fd387:/src/common/webviewarchivehandler.cpp diff --git a/src/common/webviewarchivehandler.cpp b/src/common/webviewarchivehandler.cpp index 2d8f16d633..6b9bdd5c24 100644 --- a/src/common/webviewarchivehandler.cpp +++ b/src/common/webviewarchivehandler.cpp @@ -10,7 +10,7 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#if wxUSE_WEBVIEW && (wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE) +#if wxUSE_WEBVIEW #if defined(__BORLANDC__) #pragma hdrstop @@ -50,6 +50,11 @@ wxWebViewArchiveHandler::wxWebViewArchiveHandler(const wxString& scheme) : m_fileSystem = new wxFileSystem(); } +wxWebViewArchiveHandler::~wxWebViewArchiveHandler() +{ + wxDELETE(m_fileSystem); +} + wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) { //If there is a fragment at the end of the path then we need to strip it @@ -81,7 +86,7 @@ wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) return NULL; wxString fspath = "file:" + - EscapeFileNameCharsInURL(path.substr(doubleslash + 2)); + EscapeFileNameCharsInURL(path.substr(doubleslash + 2).c_str()); return m_fileSystem->OpenFile(fspath); } //Otherwise we need to extract the protocol @@ -104,10 +109,10 @@ wxFSFile* wxWebViewArchiveHandler::GetFile(const wxString &uri) return NULL; wxString fspath = "file:" + - EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2)) + EscapeFileNameCharsInURL(mainpath.substr(doubleslash + 2).c_str()) + "#" + protocol +":" + archivepath; return m_fileSystem->OpenFile(fspath); } } -#endif // wxUSE_WEBVIEW && (wxUSE_WEBVIEW_WEBKIT || wxUSE_WEBVIEW_IE) +#endif // wxUSE_WEBVIEW