ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
Date Wed, 15 Oct 2003 18:45:13 GMT
antoine     2003/10/15 11:45:13

  Modified:    src/testcases/org/apache/tools/ant/taskdefs/optional/net
                        Tag: ANT_16_BRANCH FTPTest.java
               src/etc/testcases/taskdefs/optional/net Tag: ANT_16_BRANCH
                        ftp.xml
               src/main/org/apache/tools/ant/taskdefs/optional/net Tag:
                        ANT_16_BRANCH FTP.java
  Log:
  Fix problem with ftp scanning when remotedir is not absolute
  I improved the test cases parallel to that, but there is no specific testcase
  for this problem, because I did not know how to write (ie I do not know what to
  expect in the ftp default directory. Some ftp servers will be configured to default
  to the home directory of the ftp user, or to default to the root of the server's file system).
  PR: 23833
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.8.2.2   +5 -0      ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java
  
  Index: FTPTest.java
  ===================================================================
  RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/optional/net/FTPTest.java,v
  retrieving revision 1.8.2.1
  retrieving revision 1.8.2.2
  diff -u -r1.8.2.1 -r1.8.2.2
  --- FTPTest.java	13 Oct 2003 19:37:01 -0000	1.8.2.1
  +++ FTPTest.java	15 Oct 2003 18:45:12 -0000	1.8.2.2
  @@ -113,6 +113,11 @@
       }
   
       public void tearDown() {
  +        try {
  +            ftp.disconnect();
  +        } catch (IOException ioe) {
  +            // do nothing
  +        }
           getProject().executeTarget("cleanup");
       }
       private boolean changeRemoteDir(String remoteDir) {
  
  
  
  No                   revision
  No                   revision
  1.5.2.2   +6 -1      ant/src/etc/testcases/taskdefs/optional/net/ftp.xml
  
  Index: ftp.xml
  ===================================================================
  RCS file: /home/cvs/ant/src/etc/testcases/taskdefs/optional/net/ftp.xml,v
  retrieving revision 1.5.2.1
  retrieving revision 1.5.2.2
  diff -u -r1.5.2.1 -r1.5.2.2
  --- ftp.xml	13 Oct 2003 19:37:02 -0000	1.5.2.1
  +++ ftp.xml	15 Oct 2003 18:45:12 -0000	1.5.2.2
  @@ -4,9 +4,9 @@
       <property name="ftp.host" value="localhost"/>
       <property name="ftp.port" value="21" />
       <property name="ftp.password" value="sunshine" />
  +    <property name="ftp.filesep" value="/"/>
       <property name="tmp.dir" location="tmp"/>
       <property name="tmp.get.dir" location="tmp.get"/>
  -    <property name="ftp.filesep" value="/"/>
       <fileset dir="${tmp.get.dir}" id="fileset-destination-with-selector">
           <include name="alpha/**"/>
           <filename name="**/alpha.xml" />
  @@ -34,6 +34,7 @@
               server="${ftp.host}"
               userid="${ftp.user}"
               password="${ftp.password}"
  +            separator="${ftp.filesep}"
               remotedir="${tmp.dir}">
               <fileset refid="fileset-destination-with-selector"/>
           </ftp>
  @@ -57,6 +58,7 @@
               server="${ftp.host}"
               userid="${ftp.user}"
               password="${ftp.password}"
  +            separator="${ftp.filesep}"
               remotedir="${tmp.dir}"
               >
               <fileset refid="fileset-destination-followsymlinks"/>
  @@ -67,6 +69,7 @@
               server="${ftp.host}"
               userid="${ftp.user}"
               password="${ftp.password}"
  +            separator="${ftp.filesep}"
               remotedir="${tmp.dir}"
               >
               <fileset refid="fileset-destination-nofollowsymlinks"/>
  @@ -85,6 +88,7 @@
               server="${ftp.host}"
               userid="${ftp.user}"
               password="${ftp.password}"
  +            separator="${ftp.filesep}"
               remotedir="${tmp.dir}">
               <fileset dir="${tmp.get.dir}">
                   <include name="**"/>
  @@ -94,6 +98,7 @@
               server="${ftp.host}"
               userid="${ftp.user}"
               password="${ftp.password}"
  +            separator="${ftp.filesep}"
               remotedir="${tmp.dir}">
               <fileset dir="${tmp.get.dir}">
                   <include name="**"/>
  
  
  
  No                   revision
  No                   revision
  1.52.2.3  +1 -1      ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java
  
  Index: FTP.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/net/FTP.java,v
  retrieving revision 1.52.2.2
  retrieving revision 1.52.2.3
  diff -u -r1.52.2.2 -r1.52.2.3
  --- FTP.java	14 Oct 2003 13:20:12 -0000	1.52.2.2
  +++ FTP.java	15 Oct 2003 18:45:12 -0000	1.52.2.3
  @@ -273,7 +273,7 @@
               // construct it
               if (newroots.containsKey("")) {
                   // we are going to scan everything anyway
  -                scandir(remotedir, "", true);
  +                scandir(rootPath, "", true);
               } else {
                   // only scan directories that can include matched files or
                   // directories
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message