Browse Source

Some ftp servers have binary as default, so when binary is false

it is good to set explicitly the ascii mode for the transfer.
Problem reported by Michael Nebus (Michael dot Nebus at Pfizer dot com)


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274980 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 22 years ago
parent
commit
92245fefff
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java

+ 6
- 0
src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java View File

@@ -1203,6 +1203,12 @@ public class FTP
throw new BuildException("could not set transfer type: "
+ ftp.getReplyString());
}
} else {
ftp.setFileType(org.apache.commons.net.ftp.FTP.ASCII_FILE_TYPE);
if (!FTPReply.isPositiveCompletion(ftp.getReplyCode())) {
throw new BuildException("could not set transfer type: "
+ ftp.getReplyString());
}
}

if (passive) {


Loading…
Cancel
Save