diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2007-05-09 18:24:27 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2007-05-09 18:24:27 +0000 |
commit | 41ba7666f0d67617462c717ef0a859c3347dd3b3 (patch) | |
tree | f7778e245450e125de916362ffb89c67fd7fefc1 /lib | |
parent | 4367e0513acedbc645c6b1a09946da7bd4167b78 (diff) |
Kristian Gunstone fixed a problem where overwriting an uploaded file with
sftp didn't truncate it first, which would corrupt the file if the new
file was shorter than the old.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -723,7 +723,7 @@ CURLcode Curl_sftp_do(struct connectdata *conn, bool *done) */ sftp->sftp_handle = libssh2_sftp_open(sftp->sftp_session, sftp->path, - LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT, + LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_TRUNC, LIBSSH2_SFTP_S_IRUSR|LIBSSH2_SFTP_S_IWUSR| LIBSSH2_SFTP_S_IRGRP|LIBSSH2_SFTP_S_IROTH); if (!sftp->sftp_handle) { |