X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..b31ce22480aa50a1f018ce62522a2faecba38ea5:/src/common/zipstrm.cpp diff --git a/src/common/zipstrm.cpp b/src/common/zipstrm.cpp index 6a7ebb12cc..3e8d0dead1 100644 --- a/src/common/zipstrm.cpp +++ b/src/common/zipstrm.cpp @@ -3,7 +3,7 @@ // Purpose: input stream for ZIP archive access // Author: Vaclav Slavik // Copyright: (c) 1999 Vaclav Slavik -// Licence: wxWindows Licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) @@ -40,13 +40,14 @@ wxZipInputStream::wxZipInputStream(const wxString& archive, const wxString& file m_Pos = 0; m_Size = 0; - m_Archive = (void*) unzOpen(archive.mb_str()); + m_Archive = (void*) unzOpen(archive.mb_str(wxConvFile)); if (m_Archive == NULL) { m_lasterror = wxSTREAM_READ_ERROR; return; } - if (unzLocateFile((unzFile)m_Archive, file.mb_str(), 0) != UNZ_OK) + // TODO what encoding does ZIP use? + if (unzLocateFile((unzFile)m_Archive, file.ToAscii(), 0) != UNZ_OK) { m_lasterror = wxSTREAM_READ_ERROR; return; @@ -122,7 +123,7 @@ off_t wxZipInputStream::OnSysSeek(off_t seek, wxSeekMode mode) default : nextpos = m_Pos; break; /* just to fool compiler, never happens */ } - size_t toskip = 0; + size_t toskip; if ( nextpos > m_Pos ) { toskip = nextpos - m_Pos;