From 468c46935a53da994dd3a7ca8222277cae9ca851 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 6 Jul 2006 00:14:26 +0000 Subject: [PATCH] use ZIP entry modification time, not the (inexistent) file modification time git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40020 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/fs_zip.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index 5e56e3c55f..b8ef9b69f9 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -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 ); }