diff --git a/xvaga/xvaga.cpp b/xvaga/xvaga.cpp index 6b0be5467..e289a3a19 100755 --- a/xvaga/xvaga.cpp +++ b/xvaga/xvaga.cpp @@ -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);