- unzGetCurrentFileInfo((unzFile)m_Archive, NULL, namebuf, 1024, NULL, 0, NULL, 0);
- for (c = namebuf; *c; c++) if (*c == '\\') *c = '/';
- namestr = wxString::FromAscii( namebuf ); // TODO what encoding does ZIP use?
+ wxZipEntry *entry = m_Archive->GetNextEntry();
+ if (!entry)
+ {
+ CloseArchive(m_Archive);
+ m_Archive = NULL;
+ break;
+ }
+ namestr = entry->GetName(wxPATH_UNIX);
+ delete entry;