]> git.saurik.com Git - wxWidgets.git/commitdiff
somewhat modded [ 1056879 ] use wxURI::Unescape vs wxURL::ConvertFromURI
authorRyan Norton <wxprojects@comcast.net>
Fri, 29 Oct 2004 20:19:49 +0000 (20:19 +0000)
committerRyan Norton <wxprojects@comcast.net>
Fri, 29 Oct 2004 20:19:49 +0000 (20:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/ftp.cpp
src/common/sckfile.cpp

index a2f4cad4afd6efdaf7e6df71620e3f4b6b423557..0a470ca93f1ba41d2f087c4a0362500e76c0b11a 100644 (file)
@@ -760,9 +760,6 @@ bool wxFTP::Abort()
 
 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;
 
@@ -774,7 +771,7 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path)
         return NULL;
     }
 
         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;
 
@@ -789,7 +786,6 @@ wxInputStream *wxFTP::GetInputStream(const wxString& path)
     wxInputFTPStream *in_stream = new wxInputFTPStream(this, sock);
 
     return in_stream;
     wxInputFTPStream *in_stream = new wxInputFTPStream(this, sock);
 
     return in_stream;
-#endif
 }
 
 wxOutputStream *wxFTP::GetOutputStream(const wxString& path)
 }
 
 wxOutputStream *wxFTP::GetOutputStream(const wxString& path)
index 2e3827ef6c809f21a7b49addc3b9c8b37a2f133b..483f4eb7c872535cd7eeed85b042f49a90f34340 100644 (file)
@@ -43,17 +43,13 @@ wxFileProto::~wxFileProto()
 
 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
 }
 
 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE
 }
 
 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE