]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - psftp.c
Fix misspelled redirect of the 64-bit installer.
[PuTTY.git] / psftp.c
diff --git a/psftp.c b/psftp.c
index d8c4d071f0c3b4c42be646a8aa3d481d4ee71696..513f202b674cd81bd22946eca18746aa49e40750 100644 (file)
--- a/psftp.c
+++ b/psftp.c
@@ -491,7 +491,7 @@ int sftp_put_file(char *fname, char *outfname, int recurse, int restart)
     struct sftp_request *req;
     uint64 offset;
     RFile *file;
-    int ret, err = 0, eof;
+    int err = 0, eof;
     struct fxp_attrs attrs;
     long permissions;
 
@@ -644,6 +644,7 @@ int sftp_put_file(char *fname, char *outfname, int recurse, int restart)
     if (restart) {
        char decbuf[30];
        struct fxp_attrs attrs;
+        int ret;
 
        req = fxp_fstat_send(fh);
         pktin = sftp_wait_for_reply(req);
@@ -712,7 +713,12 @@ 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);
+    if (!fxp_close_recv(pktin, req)) {
+       if (!err) {
+           printf("error while closing: %s", fxp_error());
+           err = 1;
+       }
+    }
 
     close_rfile(file);
 
@@ -2659,7 +2665,9 @@ static void usage(void)
 
 static void version(void)
 {
-  printf("psftp: %s\n", ver);
+  char *buildinfo_text = buildinfo("\n");
+  printf("psftp: %s\n%s\n", ver, buildinfo_text);
+  sfree(buildinfo_text);
   cleanup_exit(1);
 }