diff -uNr apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java apache-ant-1.7.1p/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java --- apache-ant-1.7.1/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java 2008-06-27 08:05:20.000000000 +0300 +++ apache-ant-1.7.1p/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java 2013-01-08 13:00:34.203572218 +0200 @@ -88,8 +88,10 @@ protected static final int CHMOD = 5; protected static final int RM_DIR = 6; protected static final int SITE_CMD = 7; - /** return code of ftp - not implemented in commons-net version 1.0 */ + /** return code of ftp */ private static final int CODE_521 = 521; + private static final int CODE_550 = 550; + private static final int CODE_553 = 553; /** adjust uptodate calculations where server timestamps are HH:mm and client's * are HH:mm:ss */ @@ -2222,7 +2224,7 @@ // failed because the directory already exists. int rc = ftp.getReplyCode(); if (!(ignoreNoncriticalErrors - && (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553 + && (rc == CODE_550 || rc == CODE_553 || rc == CODE_521))) { throw new BuildException("could not create directory: " + ftp.getReplyString()); @@ -2253,7 +2255,7 @@ throws BuildException { int rc = ftp.getReplyCode(); if (!(ignoreNoncriticalErrors - && (rc == FTPReply.CODE_550 || rc == FTPReply.CODE_553 || rc == CODE_521))) { + && (rc == CODE_550 || rc == CODE_553 || rc == CODE_521))) { throw new BuildException("could not create directory: " + ftp.getReplyString()); }