diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index a2f4cad4af..0a470ca93f 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -760,9 +760,6 @@ bool wxFTP::Abort() wxInputStream *wxFTP::GetInputStream(const wxString& path) { -#if !wxUSE_URL - return NULL; -#else if ( ( m_currentTransfermode == NONE ) && !SetTransferMode(BINARY) ) return NULL; @@ -774,7 +771,7 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path) 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; @@ -789,7 +786,6 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path) wxInputFTPStream *in_stream = new wxInputFTPStream(this, sock); return in_stream; -#endif } wxOutputStream *wxFTP::GetOutputStream(const wxString& path) diff --git a/src/common/sckfile.cpp b/src/common/sckfile.cpp index 2e3827ef6c..483f4eb7c8 100644 --- a/src/common/sckfile.cpp +++ b/src/common/sckfile.cpp @@ -43,17 +43,13 @@ wxFileProto::~wxFileProto() 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; } -#endif } #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE