Patch level : 10.0
Files correlati : xvaga.dll Ricompilazione Demo : [ ] Commento : Tentativo di miglioramento del procotollo FTP: nel caso non funzioni il trasferimento in passive mode, ritenti con l'active. git-svn-id: svn://10.65.10.50/branches/R_10_00@22363 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
15d97b0319
commit
38d4e6e59c
@ -1905,9 +1905,19 @@ BOOLEAN xvt_fsys_set_dir(const DIRECTORY *dirp)
|
||||
BOOLEAN xvt_fsys_fcopy(const char* orig, const char* dest)
|
||||
{
|
||||
wxURL orig_url(orig);
|
||||
wxURL dest_url(dest);
|
||||
wxInputStream * input = orig_url.GetInputStream();
|
||||
wxOutputStream * output = NULL;
|
||||
|
||||
if (input == NULL && orig_url.GetScheme() == "ftp")
|
||||
{
|
||||
wxFTP& ftp = (wxFTP&)orig_url.GetProtocol();
|
||||
ftp.SetPassive(false);
|
||||
input = orig_url.GetInputStream();
|
||||
if (input == NULL)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxURL dest_url(dest);
|
||||
wxOutputStream* output = NULL;
|
||||
wxString scheme = dest_url.GetScheme();
|
||||
|
||||
if (input == NULL)
|
||||
@ -1922,7 +1932,6 @@ BOOLEAN xvt_fsys_fcopy(const char* orig, const char* dest)
|
||||
const wxString fnDir = fnPath.GetPath(wxPATH_GET_VOLUME, wxPATH_UNIX);
|
||||
const wxString fnName = fnPath.GetFullName();
|
||||
|
||||
|
||||
if (!strUser.IsEmpty())
|
||||
{
|
||||
ftp.SetUser(strUser);
|
||||
@ -1967,7 +1976,7 @@ BOOLEAN xvt_fsys_fcopy(const char* orig, const char* dest)
|
||||
else
|
||||
output = new wxFileOutputStream(dest);
|
||||
|
||||
bool ok = false;
|
||||
BOOLEAN ok = FALSE;
|
||||
if (input != NULL && output != NULL)
|
||||
{
|
||||
input->Read(*output);
|
||||
|
Loading…
x
Reference in New Issue
Block a user