From af734d01c115f5172d535d6a1d1716b02671b674 Mon Sep 17 00:00:00 2001
From: Stefan Bodewig
Date: Fri, 7 Mar 2003 14:53:36 +0000
Subject: [PATCH] .ssh is in ${user.home}, not ${user.dir}.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274212 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/OptionalTasks/scp.html | 2 +-
src/main/org/apache/tools/ant/taskdefs/optional/ssh/Scp.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/manual/OptionalTasks/scp.html b/docs/manual/OptionalTasks/scp.html
index fc56228e3..dc8c03cbf 100644
--- a/docs/manual/OptionalTasks/scp.html
+++ b/docs/manual/OptionalTasks/scp.html
@@ -54,7 +54,7 @@ for more information.
the identity of the remote host. This must be a SSH2 format file.
SSH1 format is not supported.
No, defaults to
- ${user.dir}/.ssh/known_hosts. |
+ ${user.home}/.ssh/known_hosts.
failonerror |
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 a943048ca..7f3e6470b 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
@@ -118,7 +118,7 @@ public class Scp extends Task implements LogListener {
* Sets the path to the file that has the identities of
* all known hosts. This is used by SSH protocol to validate
* the identity of the host. The default is
- * {$user.dir}/.ssh/known_hosts.
+ * ${user.home}/.ssh/known_hosts.
* @param knownHosts a path to the known hosts file.
*/
@@ -161,7 +161,7 @@ public class Scp extends Task implements LogListener {
super.init();
this.toUri = null;
this.fromUri = null;
- this.knownHosts = System.getProperty("user.dir") + "/.ssh/known_hosts";
+ this.knownHosts = System.getProperty("user.home") + "/.ssh/known_hosts";
this.trust = false;
this.port = 22;
this.fileSets = null;