Browse Source

Add in extra error case when creating directories.

Submitted By: Stuart Roebuck <stuart.roebuck@adolos.co.uk>


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@268432 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
568f34ca12
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java

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

@@ -512,8 +512,11 @@ public class FTP
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: " +


Loading…
Cancel
Save