]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/zipstrm.cpp
open registry keys in read-only mode as we might not have the rights for full access...
[wxWidgets.git] / src / common / zipstrm.cpp
index 6a7ebb12cc21b00932df69e6a10cd2a677af790b..d01d464df2c093e939b20b145099e47ae09ae371 100644 (file)
@@ -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;