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
This commit is contained in:
parent
e313e308c0
commit
6cc280ca91
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user