Browse Source

merge fix for PR 49296

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@945041 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 15 years ago
parent
commit
969aeca238
1 changed files with 13 additions and 2 deletions
  1. +13
    -2
      src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java

+ 13
- 2
src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java View File

@@ -736,7 +736,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror {
} else if (!result) {
return;
}
this.curpwd = this.curpwd + task.getSeparator()
this.curpwd = getCurpwdPlusFileSep()
+ currentPathElement;
} catch (IOException ioe) {
throw new BuildException("could not change working dir to "
@@ -797,7 +797,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror {
* @return absolute path as string
*/
public String getAbsolutePath() {
return curpwd + task.getSeparator() + ftpFile.getName();
return getCurpwdPlusFileSep() + ftpFile.getName();
}
/**
* find out the relative path assuming that the path used to construct
@@ -942,6 +942,17 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror {
public String getCurpwd() {
return curpwd;
}
/**
* returns the path of the directory containing the AntFTPFile.
* of the full path of the file itself in case of AntFTPRootFile
* and appends the remote file separator if necessary.
* @return parent directory of the AntFTPFile
* @since Ant 1.8.2
*/
public String getCurpwdPlusFileSep() {
String sep = task.getSeparator();
return curpwd.endsWith(sep) ? curpwd : curpwd + sep;
}
/**
* find out if a symbolic link is encountered in the relative path of this file
* from rootPath.


Loading…
Cancel
Save