From cd1fb767982f2edccacada9cde5fcce18e05355b Mon Sep 17 00:00:00 2001 From: Magesh Umasankar Date: Fri, 23 Nov 2001 19:17:45 +0000 Subject: [PATCH] Remotedir need not be specified for ftp to work. PR: 4821, 5053 Submitted by: Erik Hatcher "jakarta@ehatchersolutions.com" Remco Slotboom "remco.slotboom@ctp.com" git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269999 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 2 ++ .../org/apache/tools/ant/taskdefs/optional/net/FTP.java | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index b515bea72..f5fcc4fa1 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -18,6 +18,8 @@ Changes that could break older environments: Fixed bugs: ----------- +* Fixed bug where ant would not perform ftp without remotedir being + specified even though this was not mandatory. * Fixed bug where ant would not copy system properties into new Project in ant/antcall tasks when inheritall="false" is set. 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 cd9c310a9..c21ee0f85 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 @@ -603,7 +603,7 @@ public class FTP FTPFile[] files = ftp.listFiles(remoteFile); - // For Microsoft's Ftp-Service an Array with length 0 is + // For Microsoft's Ftp-Service an Array with length 0 is // returned if configured to return listings in "MS-DOS"-Format if (files == null || files.length == 0) { @@ -916,10 +916,9 @@ public class FTP "could not change remote directory: " + ftp.getReplyString()); } - - log(ACTION_STRS[action] + " files"); - transferFiles(ftp); } + log(ACTION_STRS[action] + " files"); + transferFiles(ftp); } }