You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2024/10/14 07:16:06 UTC
(ant) 02/03: Ensure indexOfPath is bigger than indexOfAt
This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
commit 7c6c127e854e9dbb4d444181ac1fb43510485848
Author: FROZENCADET <51...@users.noreply.github.com>
AuthorDate: Thu Oct 10 12:28:40 2024 +0530
Ensure indexOfPath is bigger than indexOfAt
---
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
index b86f4dc32..8719d3904 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java
@@ -437,7 +437,7 @@ public class Scp extends SSHBase {
// For IPv6 address having more than one ":", it should look for the last occurrence
final int indexOfPath = uri.lastIndexof(':');
- if (indexOfPath == -1) {
+ if (indexOfPath <= indexOfAt) {
throw new BuildException("no remote path in %s", uri);
}