- unzGetCurrentFileInfo((unzFile)m_Archive, NULL, namebuf, 1024, NULL, 0, NULL, 0);
- for (c = namebuf; *c; c++) if (*c == wxT('\\')) *c = wxT('/');
- fn = namebuf;
- if (fn.Last() == wxT('/')) {
- fn.RemoveLast();
- wasdir = TRUE;
- }
- else wasdir = FALSE;
-
- name = fn.AfterLast(wxT('/'));
- dir = fn.BeforeLast(wxT('/'));
-
- if (dir == m_BaseDir) {
- if (m_AllowFiles && !wasdir && wxMatchWild(m_Pattern, name, FALSE))
- match = m_ZipFile + wxT("#zip:") + fn;
- if (m_AllowDirs && wasdir && wxMatchWild(m_Pattern, name, FALSE))
- match = m_ZipFile + wxT("#zip:") + fn;
- }
-
- if (unzGoToNextFile((unzFile)m_Archive) != UNZ_OK) {
- unzClose((unzFile)m_Archive);