Browse Source

allow @s before the "real" one in scp uris. Bugzilla 38082.

Submitted by Michael Montuori/Robert Anderson.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@417590 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 19 years ago
parent
commit
fe2d7e6728
3 changed files with 5 additions and 1 deletions
  1. +1
    -0
      CONTRIBUTORS
  2. +3
    -0
      WHATSNEW
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java

+ 1
- 0
CONTRIBUTORS View File

@@ -160,6 +160,7 @@ Matthew Watson
Michael Davey
Michael J. Sikorsky
Michael McCallum
Michael Montuori
Michael Newcomb
Michael Saunders
Miha


+ 3
- 0
WHATSNEW View File

@@ -232,6 +232,9 @@ Fixed bugs:
erroneously deleted the "destination" file before attempting to rename
the source file. Bugzilla 37701.

* <scp> can now handle uris with @s other than the final one denoting the
domain. Bugzilla 38082.

Other changes:
--------------
* took in bugzilla report 39320.


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java View File

@@ -307,7 +307,7 @@ public class Scp extends SSHBase {
}

private String parseUri(String uri) {
int indexOfAt = uri.indexOf('@');
int indexOfAt = uri.lastIndexOf('@');
int indexOfColon = uri.indexOf(':');
if (indexOfColon > -1 && indexOfColon < indexOfAt) {
// user:password@host:/path notation


Loading…
Cancel
Save