diff --git a/WHATSNEW b/WHATSNEW index e300a3d2d..0e62d0a88 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -219,6 +219,9 @@ Fixed bugs: * ftp chmod failed when the remote system was UNIX and local system Windows Bugzilla Report 21865. +* ftp put with chmod failed when the remote system was UNIX and local system Windows + Bugzilla Report 23143. + * ftp did not set the ascii mode explicity, causing problems with ftp servers having binary as default diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java index b0c8636f6..a78fecf72 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java @@ -1706,7 +1706,7 @@ public class FTP } else { // see if we should issue a chmod command if (chmod != null) { - doSiteCommand(ftp, "chmod " + chmod + " " + filename); + doSiteCommand(ftp, "chmod " + chmod + " " + resolveFile(filename)); } log("File " + file.getAbsolutePath() + " copied to " + server, Project.MSG_VERBOSE);