]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_zip.cpp
fix for handling from Francesco
[wxWidgets.git] / src / common / fs_zip.cpp
index 5e56e3c55fb259a1ded9f0b2632753524c0b9196..b8ef9b69f9abecca8f7595c3117465f4445843ce 100644 (file)
@@ -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
                             );
        }