I am trying to upload files to subdirectories from an ftp server using ant. The exact set of files is known. Some of them are in subdirectories. Ant only seems to load those that are in the root directory. It works if I download all files without listing them.
The first ftp action should do the same as the second. Instead, I get "Hidden file \\ a \ a.txt, presumably not a symbolic link."
Does anyone know what's wrong here? Is this a bug in the ant FTP task?
<?xml version="1.0" encoding="utf-8"?>
<project name="example" default="example" basedir=".">
<taskdef name="ftp"
classname="org.apache.tools.ant.taskdefs.optional.net.FTP" />
<target name="example">
<ftp action="get" verbose="true"
server="localhost" userid="example" password="example"
remotedir="">
<fileset dir="downloads" casesensitive="false"
includes="a/a.txt,a/b/ab.txt,c/c.txt" />
</ftp>
<ftp action="get" verbose="true"
server="localhost" userid="example" password="example"
remotedir="a">
<fileset dir="downloads" casesensitive="false"
includes="a.txt,b/ab.txt" />
</ftp>
<ftp action="get" verbose="true"
server="localhost" userid="example" password="example"
remotedir="c">
<fileset dir="downloads" casesensitive="false"
includes="c.txt" />
</ftp>
</target>
</project>
Update: I sent an error about this to Commons Net jira
https://issues.apache.org/jira/browse/NET-324
: ant bugreport https://issues.apache.org/bugzilla/show_bug.cgi?id=49296