ant ftp doesn't download files in subdirectories when remotedir is empty or 
root folder
---------------------------------------------------------------------------------------

                 Key: NET-324
                 URL: https://issues.apache.org/jira/browse/NET-324
             Project: Commons Net
          Issue Type: Bug
    Affects Versions: 2.0
         Environment: Windows 7, 64bit, apache-ant-1.8.1, commons-net-2.0, 
jakarta-oro-2.0.8, FileZilla Server version 0.9.34 beta

            Reporter: Kristof Neirynck
            Priority: Minor


I'm trying to download files in subdirectories from an ftp server with ant. The 
exact set of files is known. Some of them are in subdirectories. Ant only seems 
to download the ones in the root directory. It does work if I download all 
files without listing them.

At first I thought I was doing something wrong so I posted a question on 
stackoverflow.
http://stackoverflow.com/questions/2790570/ant-ftp-doesnt-download-files-in-subdirectories

You can see my scriptdef workaround in the answers there.

The first ftp action should do the exact same thing as the second. Instead I 
get "Hidden file \\a\a.txt assumed to not be a symlink."

{code:title=build.xml}
<?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">

        <!-- doesn't work -->
        <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>

        <!-- works (but requires multiple ftp tasks) -->
        <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>
{code}


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to