ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
Date Tue, 29 Jul 2003 11:19:29 GMT
antoine     2003/07/29 04:19:28

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
  Log:
  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)
  
  Revision  Changes    Path
  1.39      +6 -0      ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
  
  Index: FTP.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- FTP.java	26 Jul 2003 15:58:11 -0000	1.38
  +++ FTP.java	29 Jul 2003 11:19:27 -0000	1.39
  @@ -1203,6 +1203,12 @@
                       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) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message