]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_zip.cpp
[ 1585858 ] Fix wxDatePickerCtrlGeneric and wxComboCtrl kb navigation
[wxWidgets.git] / src / common / fs_zip.cpp
index 5e56e3c55fb259a1ded9f0b2632753524c0b9196..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,14 +108,23 @@ 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)
@@ -125,8 +134,7 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l
                             GetMimeTypeFromExt(location),
                             GetAnchor(location)
 #if wxUSE_DATETIME
-                            , wxFileSystem::URLToFileName(left).
-                                GetModificationTime()
+                            , dtMod
 #endif // wxUSE_DATETIME
                             );
        }