X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7aef23e7b42412bdfddd80c6b808e0e8a183ba9..005659f0ffe0b280c3f800a5706b93fe9b78276e:/src/common/webviewarchivehandler.cpp diff --git a/src/common/webviewarchivehandler.cpp b/src/common/webviewarchivehandler.cpp index 10f15df7e0..6b9bdd5c24 100644 --- a/src/common/webviewarchivehandler.cpp +++ b/src/common/webviewarchivehandler.cpp @@ -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,7 +109,7 @@ 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); }