mirror of https://github.com/wolfSSL/wolfssh.git
Rename
Client should get the path and filename processed like the server does.pull/253/head
parent
d75e826bc9
commit
80280583ef
|
@ -1564,16 +1564,22 @@ static int wolfSSH_SCP_cmd(WOLFSSH* ssh, const char* localName,
|
||||||
WSNPRINTF(cmd, cmdSz, "scp -%c %s", dir, remoteName);
|
WSNPRINTF(cmd, cmdSz, "scp -%c %s", dir, remoteName);
|
||||||
ssh->scpBasePath = localName;
|
ssh->scpBasePath = localName;
|
||||||
ret = wolfSSH_SCP_connect(ssh, (byte*)cmd);
|
ret = wolfSSH_SCP_connect(ssh, (byte*)cmd);
|
||||||
|
if (ret == WS_SUCCESS) {
|
||||||
if (dir == 't') {
|
if (dir == 't') {
|
||||||
ssh->scpState = SCP_SOURCE_BEGIN;
|
ssh->scpState = SCP_SOURCE_BEGIN;
|
||||||
ssh->scpRequestState = SCP_SOURCE;
|
ssh->scpRequestState = SCP_SOURCE;
|
||||||
ret = DoScpSource(ssh);
|
ret = DoScpSource(ssh);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
cmdSz = (word32)WSTRLEN(localName);
|
||||||
|
ret = ParseBasePathHelper(ssh, cmdSz);
|
||||||
|
if (ret == WS_SUCCESS) {
|
||||||
ssh->scpState = SCP_SINK_BEGIN;
|
ssh->scpState = SCP_SINK_BEGIN;
|
||||||
ssh->scpRequestState = SCP_SINK;
|
ssh->scpRequestState = SCP_SINK;
|
||||||
ret = DoScpSink(ssh);
|
ret = DoScpSink(ssh);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
WFREE(cmd, ssh->ctx->heap, DYNTYPE_STRING);
|
WFREE(cmd, ssh->ctx->heap, DYNTYPE_STRING);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue