]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - psftp.c
On cleanup, PSCP and PSFTP should explicitly check that the back end
[PuTTY.git] / psftp.c
diff --git a/psftp.c b/psftp.c
index 2a74bcd28d565b0361800e58310f83225e290fd4..db3ae7f51d0ac0b58354990cb1095b10ddb197bb 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -2567,7 +2567,7 @@ int sftp_recvdata(char *buf, int len)
     }
 
     while (outlen > 0) {
-       if (ssh_sftp_loop_iteration() < 0)
+       if (back->exitcode(backhandle) >= 0 || ssh_sftp_loop_iteration() < 0)
            return 0;                  /* doom */
     }