summaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorJohn DeHelian <john.de.helian@cranepi.com>2017-12-08 11:31:01 -0500
committerDaniel Stenberg <daniel@haxx.se>2017-12-09 13:38:38 +0100
commita4a56ec93e727293f30074f4eac24c19110bd39d (patch)
treeda8c65c9dc9a14e1a1cbf3c6640310b59a507edf /lib/ssh.c
parent9fb5a943f56496fabd9dc4de6b4b27a2404bfe79 (diff)
downloadcurl-a4a56ec93e727293f30074f4eac24c19110bd39d.tar.gz
sftp: allow quoted commands to use relative paths
Closes #1900
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index a4dd878bf..bf07432bd 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -1205,7 +1205,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
* also, every command takes at least one argument so we get that
* first argument right now
*/
- result = Curl_get_pathname(&cp, &sshc->quote_path1);
+ result = Curl_get_pathname(&cp, &sshc->quote_path1, sshc->homedir);
if(result) {
if(result == CURLE_OUT_OF_MEMORY)
failf(data, "Out of memory");
@@ -1230,7 +1230,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* sshc->quote_path1 contains the mode to set */
/* get the destination */
- result = Curl_get_pathname(&cp, &sshc->quote_path2);
+ result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
if(result) {
if(result == CURLE_OUT_OF_MEMORY)
failf(data, "Out of memory");
@@ -1252,7 +1252,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* symbolic linking */
/* sshc->quote_path1 is the source */
/* get the destination */
- result = Curl_get_pathname(&cp, &sshc->quote_path2);
+ result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
if(result) {
if(result == CURLE_OUT_OF_MEMORY)
failf(data, "Out of memory");
@@ -1277,7 +1277,7 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* rename file */
/* first param is the source path */
/* second param is the dest. path */
- result = Curl_get_pathname(&cp, &sshc->quote_path2);
+ result = Curl_get_pathname(&cp, &sshc->quote_path2, sshc->homedir);
if(result) {
if(result == CURLE_OUT_OF_MEMORY)
failf(data, "Out of memory");