You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
wolfsftp: keep the remote file when resuming a put
- wolfSSH_SFTP_Put() adds WOLFSSH_FXF_TRUNC to the destination open
only when the write offset is zero.
- STATE_PUT_LOOKUP_OFFSET clears a saved offset when the local file
is no larger than it.
- A new STATE_PUT_STAT_REMOTE stats the destination when the saved
offset is nonzero, and clears the offset unless the reported size
matches it exactly, or the stat returns WS_SFTP_STATUS_NOT_OK or
WS_PERMISSIONS. Other stat failures re-save the offset and move to
STATE_PUT_CLEANUP; a want-read or want-write keeps the state.
WS_SFTP_PUT_STATE carries the attributes both states read.
- The Windows server open maps WOLFSSH_FXF_CREAT to OPEN_ALWAYS and
reserves CREATE_ALWAYS for an open that also asked for
WOLFSSH_FXF_TRUNC; the disabled TRUNCATE_EXISTING mapping is
dropped.
- tests/api.c adds test_wolfSSH_SFTP_PutResume(), five cases over the
resume paths, built where the hosted file wrappers are available.
Issue: F-11659
0 commit comments