[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Copying empty files with scp
[Thread Prev] | [Thread Next]
- Subject: Copying empty files with scp
- From: Jeroen Ooms <jeroen@xxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 2 Feb 2018 16:13:33 +0100
- To: libssh@xxxxxxxxxx
It is unclear from the documentation how to proceed with SSH_SCP_REQUEST_NEWFILE when ssh_scp_request_get_size() returns 0, i.e downloading an empty file. From trial and error I found that the client has to call ssh_scp_accept_request() and ssh_scp_read() at least once, even though there is no data to copy. If we don't do this, we get an error "called under invalid state" upon the next ssh_scp_pull_request(). Is this expected?
Re: Copying empty files with scp | Andreas Schneider <asn@xxxxxxxxxxxxxx> |