antoine 2003/10/15 11:49:54
Modified: src/testcases/org/apache/tools/ant/taskdefs/optional/net
FTPTest.java
src/etc/testcases/taskdefs/optional/net ftp.xml
src/main/org/apache/tools/ant/taskdefs/optional/net FTP.java
Log:
Merge from ANT_16_BRANCH
Fix problem with non absolute remote dirs
PR: 23833
Revision Changes Path
1.10 +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.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- FTPTest.java 13 Oct 2003 19:53:01 -0000 1.9
+++ FTPTest.java 15 Oct 2003 18:49:53 -0000 1.10
@@ -113,6 +113,11 @@
}
public void tearDown() {
+ try {
+ ftp.disconnect();
+ } catch (IOException ioe) {
+ // do nothing
+ }
getProject().executeTarget("cleanup");
}
private boolean changeRemoteDir(String remoteDir) {
1.7 +4 -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.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ftp.xml 13 Oct 2003 19:53:01 -0000 1.6
+++ ftp.xml 15 Oct 2003 18:49:53 -0000 1.7
@@ -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"/>
1.55 +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.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- FTP.java 14 Oct 2003 13:19:53 -0000 1.54
+++ FTP.java 15 Oct 2003 18:49:53 -0000 1.55
@@ -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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]