This is an automated email from the ASF dual-hosted git repository.

jaikiran pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
     new 0259c0b  bz-63259 Don't check the FTP file for being a symlink, more 
than once
0259c0b is described below

commit 0259c0b981e997a67a926c5303e8906250b30bb6
Author: Jaikiran Pai <jaiki...@apache.org>
AuthorDate: Fri May 17 09:51:46 2019 +0530

    bz-63259 Don't check the FTP file for being a symlink, more than once
    
    Patch contributed by Eugène Adell, as an attachment in the bugzilla issue.
    
    Signed-off-by: Jaikiran Pai <jaiki...@apache.org>
---
 WHATSNEW                                                     | 6 ++++++
 src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/WHATSNEW b/WHATSNEW
index b88b95f..86f2e4c 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 fe757e2..5838e1e 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);
                             }
                         }

Reply via email to