]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_zip.cpp
changing graphics pen, brushes and fonts to be refcounted objects, having no subclasses
[wxWidgets.git] / src / common / fs_zip.cpp
index eefa93f96af4aa7723c2c3a963b003946f0e54f4..f96f1b8ee3111565e0a847f7cb06eeaa4eab3ff4 100644 (file)
@@ -38,7 +38,7 @@ class wxZipFSInputStream : public wxZipInputStream
                : wxZipInputStream(*file->GetStream())
        {
             m_file = file;
-#if 1 //WXWIN_COMPATIBILITY_2_6
+#if WXWIN_COMPATIBILITY_2_6
             m_allowSeeking = true;
 #endif
        }
@@ -108,25 +108,36 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l
     s = new wxZipFSInputStream(leftFile);
     if (s && s->IsOk())
     {
+#if wxUSE_DATETIME
+       wxDateTime dtMod;
+#endif // wxUSE_DATETIME
+
        bool found = false;
        while (!found)
        {
            wxZipEntry *ent = s->GetNextEntry();
            if (!ent)
                break;
+
            if (ent->GetInternalName() == right)
+           {
                found = true;
+               dtMod = ent->GetDateTime();
+           }
+
            delete ent;
        }
        if (found)
+       {
            return new wxFSFile(s,
                             left + wxT("#zip:") + right,
                             GetMimeTypeFromExt(location),
                             GetAnchor(location)
 #if wxUSE_DATETIME
-                            , wxDateTime(wxFileModificationTime(left))
+                            , dtMod
 #endif // wxUSE_DATETIME
                             );
+       }
     }
 
     delete s;