X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..3ba6891d6a5aab3832f561081040ef5a00172d05:/src/common/fs_zip.cpp diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index eefa93f96a..b8ef9b69f9 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -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;