summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaikiran Pai <jaikiran@apache.org>2019-05-17 09:51:46 +0530
committerJaikiran Pai <jaikiran@apache.org>2019-05-17 09:55:35 +0530
commit0259c0b981e997a67a926c5303e8906250b30bb6 (patch)
treef3490dff1de3e972e98215727389867704544642
parent440ef41bb99cdbbb66d10b59349a1efbf8ab7111 (diff)
downloadant-0259c0b981e997a67a926c5303e8906250b30bb6.tar.gz
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 <jaikiran@apache.org>
-rw-r--r--WHATSNEW6
-rw-r--r--src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java4
2 files changed, 9 insertions, 1 deletions
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);
}
}