#include "wx/wxprec.h"
-#ifdef __BORDLANDC__
+#ifdef __BORLANDC__
#pragma hdrstop
#endif
if (right.GetChar(0) == wxT('/')) right = right.Mid(1);
- s = new wxZipInputStream(left, right);
- if (s && (s->LastError() == wxStream_NOERROR))
+ wxString leftFilename = wxFileSystem::URLToNativePath(left);
+
+ s = new wxZipInputStream(leftFilename, right);
+ if (s && s->IsOk() )
{
return new wxFSFile(s,
left + wxT("#zip:") + right,
while (match == wxEmptyString)
{
unzGetCurrentFileInfo((unzFile)m_Archive, NULL, namebuf, 1024, NULL, 0, NULL, 0);
- for (c = namebuf; *c; c++) if (*c == wxT('\\')) *c = wxT('/');
- namestr = namebuf;
+ for (c = namebuf; *c; c++) if (*c == '\\') *c = '/';
+ namestr = wxString::FromAscii( namebuf ); // TODO what encoding does ZIP use?
if (m_AllowDirs)
{