|
@@ -834,7 +834,7 @@ public class FTP extends Task implements FTPTaskConfig { |
|
|
} else if (!result) { |
|
|
} else if (!result) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
this.curpwd = this.curpwd + remoteFileSep |
|
|
|
|
|
|
|
|
this.curpwd = getCurpwdPlusFileSep() |
|
|
+ currentPathElement; |
|
|
+ currentPathElement; |
|
|
} catch (IOException ioe) { |
|
|
} catch (IOException ioe) { |
|
|
throw new BuildException("could not change working dir to " |
|
|
throw new BuildException("could not change working dir to " |
|
@@ -895,7 +895,7 @@ public class FTP extends Task implements FTPTaskConfig { |
|
|
* @return absolute path as string |
|
|
* @return absolute path as string |
|
|
*/ |
|
|
*/ |
|
|
public String getAbsolutePath() { |
|
|
public String getAbsolutePath() { |
|
|
return curpwd + remoteFileSep + ftpFile.getName(); |
|
|
|
|
|
|
|
|
return getCurpwdPlusFileSep() + ftpFile.getName(); |
|
|
} |
|
|
} |
|
|
/** |
|
|
/** |
|
|
* find out the relative path assuming that the path used to construct |
|
|
* find out the relative path assuming that the path used to construct |
|
@@ -1036,6 +1036,17 @@ public class FTP extends Task implements FTPTaskConfig { |
|
|
public String getCurpwd() { |
|
|
public String getCurpwd() { |
|
|
return curpwd; |
|
|
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() { |
|
|
|
|
|
return curpwd.endsWith(remoteFileSep) ? curpwd |
|
|
|
|
|
: curpwd + remoteFileSep; |
|
|
|
|
|
} |
|
|
/** |
|
|
/** |
|
|
* find out if a symbolic link is encountered in the relative path of this file |
|
|
* find out if a symbolic link is encountered in the relative path of this file |
|
|
* from rootPath. |
|
|
* from rootPath. |
|
|