[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Copying empty files with scp
[Thread Prev] | [Thread Next]
- Subject: Re: Copying empty files with scp
- From: Andreas Schneider <asn@xxxxxxxxxxxxxx>
- Reply-to: libssh@xxxxxxxxxx
- Date: Fri, 02 Feb 2018 23:20:58 +0100
- To: libssh@xxxxxxxxxx
On Friday, 2 February 2018 16:13:33 CET Jeroen Ooms wrote: > 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? I dunno, the scp protocol is horror and should be deprecated everywhere! You should use sftp.
Copying empty files with scp | Jeroen Ooms <jeroen@xxxxxxxxxxxx> |