git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30171
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
wxInputStream *wxFTP::GetInputStream(const wxString& path)
{
wxInputStream *wxFTP::GetInputStream(const wxString& path)
{
-#if !wxUSE_URL
- return NULL;
-#else
if ( ( m_currentTransfermode == NONE ) && !SetTransferMode(BINARY) )
return NULL;
if ( ( m_currentTransfermode == NONE ) && !SetTransferMode(BINARY) )
return NULL;
- wxString tmp_str = wxT("RETR ") + wxURL::ConvertFromURI(path);
+ wxString tmp_str = wxT("RETR ") + wxURI::Unescape(path);
if ( !CheckCommand(tmp_str, '1') )
return NULL;
if ( !CheckCommand(tmp_str, '1') )
return NULL;
wxInputFTPStream *in_stream = new wxInputFTPStream(this, sock);
return in_stream;
wxInputFTPStream *in_stream = new wxInputFTPStream(this, sock);
return in_stream;
}
wxOutputStream *wxFTP::GetOutputStream(const wxString& path)
}
wxOutputStream *wxFTP::GetOutputStream(const wxString& path)
wxInputStream *wxFileProto::GetInputStream(const wxString& path)
{
wxInputStream *wxFileProto::GetInputStream(const wxString& path)
{
-#if !wxUSE_URL
- return NULL;
-#else
- wxFileInputStream* retval = new wxFileInputStream(wxURL::ConvertFromURI(path));
+ wxFileInputStream* retval = new wxFileInputStream(wxURI::Unescape(path));
if (retval->Ok()) {
return retval;
} else {
delete retval;
return 0;
}
if (retval->Ok()) {
return retval;
} else {
delete retval;
return 0;
}
}
#endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE
}
#endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE