You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[...] The commands will only be run if no error occurred [...]
Following patch does the thing:
Index: curl-7.61.0/lib/ssh.c
===================================================================
--- curl-7.61.0.orig/lib/ssh.c
+++ curl-7.61.0/lib/ssh.c
@@ -3218,8 +3218,10 @@ static CURLcode sftp_done(struct connect
if(!status) {
/* Post quote commands are executed after the SFTP_CLOSE state to avoid
errors that could happen due to open file handles during POSTQUOTE
- operation */
- if(!status && !premature && conn->data->set.postquote) {
+ operation. This step is skipped if this is retry operation, to avoid
+ executing postquotes when operation is not successful.*/
+ if(!status && !premature && conn->data->set.postquote
+ && !conn->bits.retry) {
sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
state(conn, SSH_SFTP_CLOSE);
}
curl/libcurl version
7.61.0
operating system
Ubuntu 16.04 (libssh2 1.8.0)
The text was updated successfully, but these errors were encountered:
I did this
sftp://server
),sftp://server
(sftp://server/file1
),sftp://server/file1
when download is successful,Following code shows this approach
What may happen:
sftp://server/file
is removed,sftp://server/file
does not exist.I expected the following
Postquote commands are not executed when retry operation is going to be executed, as explained here: https://curl.haxx.se/libcurl/c/CURLOPT_POSTQUOTE.html
Following patch does the thing:
curl/libcurl version
7.61.0
operating system
Ubuntu 16.04 (libssh2 1.8.0)
The text was updated successfully, but these errors were encountered: