X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/58c837a4e67c0996134cc0947691dc09c5f26687..4f9297b0eead20a0bfee71df18e0d8f0cbc402fb:/src/common/fs_zip.cpp diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index d390e17df0..e78ce297a0 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -17,7 +17,7 @@ #pragma hdrstop #endif -#if wxUSE_FS_ZIP +#if wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_ZIPSTREAM #ifndef WXPRECOMP #include "wx/wx.h" @@ -82,9 +82,12 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l return new wxFSFile(s, left + wxT("#zip:") + right, GetMimeTypeFromExt(location), - GetAnchor(location)); + GetAnchor(location), + wxDateTime(wxFileModificationTime(left))); } - else return NULL; + + delete s; + return NULL; } @@ -112,7 +115,7 @@ wxString wxZipFSHandler::FindFirst(const wxString& spec, int flags) } m_ZipFile = left; - m_Archive = (void*) unzOpen(m_ZipFile.fn_str()); + m_Archive = (void*) unzOpen(m_ZipFile.mb_str()); m_Pattern = right.AfterLast(wxT('/')); m_BaseDir = right.BeforeLast(wxT('/')); @@ -176,4 +179,5 @@ wxString wxZipFSHandler::DoFind() -#endif // wxUSE_FS_ZIP +#endif + //wxUSE_FILESYSTEM && wxUSE_FS_ZIP && wxUSE_ZIPSTREAM