ftp: never set data->set.ftp_append outside setopt

Since the set value then risks getting used like that when the easy
handle is reused by the application.

Also: renamed the struct field from 'ftp_append' to 'remote_append'
since it is also used for SSH protocols.

Closes #6579
This commit is contained in:
Daniel Stenberg 2021-02-08 16:21:31 +01:00
parent d836d362ec
commit 0c51036eb6
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 8 additions and 8 deletions

View file

@ -585,7 +585,7 @@ static CURLcode wssh_statemach_act(struct Curl_easy *data, bool *block)
}
}
if(data->set.ftp_append)
if(data->set.remote_append)
/* Try to open for append, but create if nonexisting */
flags = WOLFSSH_FXF_WRITE|WOLFSSH_FXF_CREAT|WOLFSSH_FXF_APPEND;
else if(data->state.resume_from > 0)