diff options
author | Daniel Stenberg <daniel@haxx.se> | 2007-05-08 11:34:31 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2007-05-08 11:34:31 +0000 |
commit | 1b7f00b2a68b59249181dac6557630e20f394ea6 (patch) | |
tree | 5adbdaf340f21646e1529e9c4aaccb3e8a0c4531 /lib | |
parent | ad19f95f15bac425c1b37a7a260025d8fc9fe63c (diff) |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh.c | 12 | ||||
-rw-r--r-- | lib/strerror.c | 4 |
2 files changed, 10 insertions, 6 deletions
@@ -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| diff --git a/lib/strerror.c b/lib/strerror.c index b07067cec..118c98ede 100644 --- a/lib/strerror.c +++ b/lib/strerror.c @@ -123,8 +123,8 @@ curl_easy_strerror(CURLcode error) case CURLE_WRITE_ERROR: return "failed writing received data to disk/application"; - case CURLE_FTP_COULDNT_STOR_FILE: - return "failed FTP upload (the STOR command)"; + case CURLE_UPLOAD_FAILED: + return "upload failed (at start/before it took off)"; case CURLE_READ_ERROR: return "failed to open/read local data from file/application"; |