X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a1b2c283e9a74779d1d3ca149aadb7a48223dbd..c27eab7e9ce512e052046886a33c5f5002d42573:/src/common/ftp.cpp diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index d0b2a80211..2b01b3a3e9 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -20,6 +20,8 @@ #pragma hdrstop #endif +#if wxUSE_SOCKETS + #ifndef __MWERKS__ #include #endif @@ -253,7 +255,7 @@ public: wxInputFTPStream(wxFTP *ftp_clt, wxSocketBase *sock) : wxSocketInputStream(*sock), m_ftp(ftp_clt) {} - size_t StreamSize() { return m_ftpsize; } + size_t StreamSize() const { return m_ftpsize; } virtual ~wxInputFTPStream(void) { if (LastError() != wxStream_NOERROR) @@ -351,7 +353,7 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path) pos_size = m_lastResult.Index('('); if (pos_size != wxNOT_FOUND) { - wxString str_size = m_lastResult(pos_size, m_lastResult.Index(')')); + wxString str_size = m_lastResult(pos_size+1, m_lastResult.Index(')')-1); in_stream->m_ftpsize = atoi(WXSTRINGCAST str_size); } @@ -401,5 +403,11 @@ wxList *wxFTP::GetList(const wxString& wildcard) return NULL; } + sock->SetEventHandler(*GetNextHandler(), m_id); + sock->Notify(m_notifyme); + sock->SetNotify(m_neededreq); + return file_list; } +#endif + // wxUSE_SOCKETS