diff --git a/WHATSNEW b/WHATSNEW index f7898c968..f8e105bf9 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -225,6 +225,9 @@ Fixed bugs: * ftp did not set the ascii mode explicity, causing problems with ftp servers having binary as default +* ftp was not able to download files when they were pointed to by symbolic links + Bugzilla Report 14063. + * replace would change \r\n into \r\r\n under Windows. * junitreport with frames did not display a link for classes without a package diff --git a/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java b/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java index e6eda0e97..4b1b47f24 100644 --- a/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java +++ b/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java @@ -241,7 +241,24 @@ public class FTPTest extends BuildFileTest{ ds.scan(); compareFiles(ds, new String[] {}, new String[] {}); } - + public void testFileSymlink() { + if (!supportsSymlinks) { + return; + } + if (!loginSuceeded) { + return; + } + if (!changeRemoteDir(remoteTmpDir)) { + return; + } + getProject().executeTarget("symlink-file-setup"); + FTP.FTPDirectoryScanner ds = myFTPTask.newScanner(ftp); + ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); + ds.setIncludes(new String[] {"alpha/beta/gamma/"}); + ds.scan(); + compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"}, + new String[] {"alpha/beta/gamma"}); + } // father and child pattern test public void testOrderOfIncludePatternsIrrelevant() { if (!loginSuceeded) {