From 6cc280ca919b6b5475bcc3aa70e0822ef6e33f21 Mon Sep 17 00:00:00 2001 From: Ryan Norton Date: Fri, 29 Oct 2004 20:19:49 +0000 Subject: [PATCH] somewhat modded [ 1056879 ] use wxURI::Unescape vs wxURL::ConvertFromURI git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/ftp.cpp | 6 +----- src/common/sckfile.cpp | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) 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 -- 2.45.2