lib: unify the upload/method handling

By making sure we set state.upload based on the set.method value and not
independently as set.upload, we reduce confusion and mixup risks, both
internally and externally.

Closes #11017
This commit is contained in:
Daniel Stenberg 2023-04-25 08:28:01 +02:00
parent e5af5b7905
commit 7815647d65
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
15 changed files with 36 additions and 38 deletions

View file

@ -557,7 +557,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
}
break;
case SSH_SFTP_TRANS_INIT:
if(data->set.upload)
if(data->state.upload)
state(data, SSH_SFTP_UPLOAD_INIT);
else {
if(sftp_scp->path[strlen(sftp_scp->path)-1] == '/')