]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_zip.cpp
wxWinCE power build fixes.
[wxWidgets.git] / src / common / fs_zip.cpp
index d2b6100cc2086cc76b4910cf39b340375015d1e5..5e56e3c55fb259a1ded9f0b2632753524c0b9196 100644 (file)
@@ -7,12 +7,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-
-
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "fs_zip.h"
-#endif
-
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
 #include "wx/wxprec.h"
 
 #ifdef __BORLANDC__
@@ -71,13 +65,17 @@ wxZipFSHandler::wxZipFSHandler() : wxFileSystemHandler()
 
 wxZipFSHandler::~wxZipFSHandler()
 {
 
 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)
 {
 
 bool wxZipFSHandler::CanOpen(const wxString& location)
 {
@@ -121,14 +119,17 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l
            delete ent;
        }
        if (found)
            delete ent;
        }
        if (found)
+       {
            return new wxFSFile(s,
                             left + wxT("#zip:") + right,
                             GetMimeTypeFromExt(location),
                             GetAnchor(location)
 #if wxUSE_DATETIME
            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
                             );
 #endif // wxUSE_DATETIME
                             );
+       }
     }
 
     delete s;
     }
 
     delete s;