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
This commit is contained in:
Vadim Zeitlin
2006-07-06 00:14:26 +00:00
parent 2713fedc46
commit 468c46935a

View File

@@ -108,14 +108,23 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l
s = new wxZipFSInputStream(leftFile); s = new wxZipFSInputStream(leftFile);
if (s && s->IsOk()) if (s && s->IsOk())
{ {
#if wxUSE_DATETIME
wxDateTime dtMod;
#endif // wxUSE_DATETIME
bool found = false; bool found = false;
while (!found) while (!found)
{ {
wxZipEntry *ent = s->GetNextEntry(); wxZipEntry *ent = s->GetNextEntry();
if (!ent) if (!ent)
break; break;
if (ent->GetInternalName() == right) if (ent->GetInternalName() == right)
{
found = true; found = true;
dtMod = ent->GetDateTime();
}
delete ent; delete ent;
} }
if (found) if (found)
@@ -125,8 +134,7 @@ wxFSFile* wxZipFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& l
GetMimeTypeFromExt(location), GetMimeTypeFromExt(location),
GetAnchor(location) GetAnchor(location)
#if wxUSE_DATETIME #if wxUSE_DATETIME
, wxFileSystem::URLToFileName(left). , dtMod
GetModificationTime()
#endif // wxUSE_DATETIME #endif // wxUSE_DATETIME
); );
} }