X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ba75c6bb8c85705aca6b46871e0fc6548f15a73d..dbc74bccc9d020281f2e1fcceb35323d45c91566:/src/common/fs_zip.cpp?ds=sidebyside diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index d2b6100cc2..5e56e3c55f 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -7,12 +7,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "fs_zip.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -71,13 +65,17 @@ wxZipFSHandler::wxZipFSHandler() : wxFileSystemHandler() wxZipFSHandler::~wxZipFSHandler() { - if (m_Archive) - delete m_Archive; - if (m_DirsFound) - delete m_DirsFound; + Cleanup(); } +void wxZipFSHandler::Cleanup() +{ + wxDELETE(m_Archive); + wxDELETE(m_DirsFound); +} + + bool wxZipFSHandler::CanOpen(const wxString& location) { @@ -121,14 +119,17 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l delete ent; } if (found) + { return new wxFSFile(s, left + wxT("#zip:") + right, GetMimeTypeFromExt(location), GetAnchor(location) #if wxUSE_DATETIME - , wxDateTime(wxFileModificationTime(left)) + , wxFileSystem::URLToFileName(left). + GetModificationTime() #endif // wxUSE_DATETIME ); + } } delete s;