aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ssh-libssh.c5
-rw-r--r--lib/ssh.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/ssh-libssh.c b/lib/ssh-libssh.c
index 002e1d96f..88f3aa63e 100644
--- a/lib/ssh-libssh.c
+++ b/lib/ssh-libssh.c
@@ -2390,8 +2390,9 @@ static CURLcode sftp_done(struct connectdata *conn, CURLcode 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) {
- sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
+ if(!status && !premature && conn->data->set.postquote &&
+ !conn->bits.retry) {
+ sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
state(conn, SSH_SFTP_CLOSE);
}
else
diff --git a/lib/ssh.c b/lib/ssh.c
index 0aaba9a6a..a4b2ca43a 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -3219,7 +3219,8 @@ static CURLcode sftp_done(struct connectdata *conn, CURLcode 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) {
+ if(!status && !premature && conn->data->set.postquote &&
+ !conn->bits.retry) {
sshc->nextstate = SSH_SFTP_POSTQUOTE_INIT;
state(conn, SSH_SFTP_CLOSE);
}