ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
Date Thu, 11 Jan 2001 11:53:54 GMT
donaldp     01/01/11 03:53:53

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
  Log:
  Add in extra error case when creating directories.
  
  Submitted By: Stuart Roebuck <stuart.roebuck@adolos.co.uk>
  
  Revision  Changes    Path
  1.5       +4 -1      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
  
  Index: FTP.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FTP.java	2001/01/03 14:18:45	1.4
  +++ FTP.java	2001/01/11 11:53:52	1.5
  @@ -512,8 +512,11 @@
                   log("creating remote directory " + resolveFile(dir.getPath()),
                       Project.MSG_VERBOSE);
                   ftp.makeDirectory(resolveFile(dir.getPath()));
  +                // Both codes 550 and 553 can be produced by FTP Servers
  +                //  to indicate that an attempt to create a directory has
  +                //  failed because the directory already exists.
                   if (!FTPReply.isPositiveCompletion(ftp.getReplyCode()) &&
  -                    (ftp.getReplyCode() != 550))
  +                    (ftp.getReplyCode() != 550) && (ftp.getReplyCode() != 553))
                   {
                       throw new BuildException(
                                                "could not create directory: " +
  
  
  

Mime
View raw message