]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - psftp.c
Handle failed SSH_FXP_CLOSE requests in sftp_put_file.
[PuTTY.git] / psftp.c
diff --git a/psftp.c b/psftp.c
index d8c4d071f0c3b4c42be646a8aa3d481d4ee71696..7b8b540df933c337a5e76f11ad6c5d17e5ddb017 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -712,7 +712,13 @@ int sftp_put_file(char *fname, char *outfname, int recurse, int restart)
   cleanup:
     req = fxp_close_send(fh);
     pktin = sftp_wait_for_reply(req);
-    fxp_close_recv(pktin, req);
+    ret = fxp_close_recv(pktin, req);
+    if (!ret) {
+       if (!err) {
+           printf("error while closing: %s", fxp_error());
+           err = 1;
+       }
+    }
 
     close_rfile(file);