CURLE_FTP_COULDNT_STOR_FILE is now known as CURLE_UPLOAD_FAILED. This is

because I just made SCP uploads return this value if the file size of
the upload file isn't given with CURLOPT_INFILESIZE*. Docs updated to
reflect this news, and a define for the old name was added to the public
header file.
This commit is contained in:
Daniel Stenberg
2007-05-08 11:34:31 +00:00
parent ad19f95f15
commit 1b7f00b2a6
6 changed files with 51 additions and 14 deletions

View File

@@ -562,11 +562,15 @@ CURLcode Curl_scp_do(struct connectdata *conn, bool *done)
*done = TRUE; /* unconditionally */
if (conn->data->set.upload) {
if(conn->data->set.infilesize < 0) {
failf(conn->data, "SCP requries a known file size for upload");
return CURLE_UPLOAD_FAILED;
}
/*
* NOTE!!! libssh2 requires that the destination path is a full path
* that includes the destination file and name OR ends in a "/" .
* If this is not done the destination file will be named the
* same name as the last directory in the path.
* libssh2 requires that the destination path is a full path that includes
* the destination file and name OR ends in a "/" . If this is not done
* the destination file will be named the same name as the last directory
* in the path.
*/
scp->ssh_channel = libssh2_scp_send_ex(scp->ssh_session, scp->path,
LIBSSH2_SFTP_S_IRUSR|