You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/01/11 12:53:54 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
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 <st...@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: " +