X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f60b1d829dd8a6d5e47a2adcd3690acb3bd10150..3c67ec06a78866b68c288f48af5e053a05beda8c:/src/common/fs_zip.cpp diff --git a/src/common/fs_zip.cpp b/src/common/fs_zip.cpp index 225159473b..b8ef9b69f9 100644 --- a/src/common/fs_zip.cpp +++ b/src/common/fs_zip.cpp @@ -7,12 +7,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - - -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "fs_zip.h" -#endif - #include "wx/wxprec.h" #ifdef __BORLANDC__ @@ -114,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;