From 0259c0b981e997a67a926c5303e8906250b30bb6 Mon Sep 17 00:00:00 2001 From: Jaikiran Pai Date: Fri, 17 May 2019 09:51:46 +0530 Subject: [PATCH] bz-63259 Don't check the FTP file for being a symlink, more than once MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch contributed by Eugène Adell, as an attachment in the bugzilla issue. Signed-off-by: Jaikiran Pai --- WHATSNEW | 6 ++++++ .../org/apache/tools/ant/taskdefs/optional/net/FTP.java | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/WHATSNEW b/WHATSNEW index b88b95f52..86f2e4c26 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -1,6 +1,12 @@ Changes from Ant 1.10.6 TO Ant 1.10.7 ===================================== +Fixed bugs: +----------- + + * FTP task no longer duplicates a check for a file being a symlink. + Bugzilla Report 63259 + Changes from Ant 1.10.5 TO Ant 1.10.6 ===================================== 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 fe757e265..5838e1e31 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 @@ -537,7 +537,9 @@ public class FTP extends Task implements FTPTaskConfig { } else { if (!isFollowSymlinks() && file.isSymbolicLink()) { filesExcluded.addElement(name); - } else if (isFunctioningAsFile(ftp, dir, file)) { + } else { + // at this point, it's either a symbolic link or a file, but not a directory. + // so we include it accountForIncludedFile(name); } }