]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - pscp.c
Return an error if there's an error doing pscp -ls
[PuTTY.git] / pscp.c
diff --git a/pscp.c b/pscp.c
index 126c2ad64d75d0f8a2964e832c314354091b4ffe..150b5492b8948b3a90b0a17895970f58ab081df2 100644 (file)
--- a/pscp.c
+++ b/pscp.c
@@ -383,6 +383,7 @@ static void do_cmd(char *host, char *user, char *cmd)
            /* Use `host' as a bare hostname. */
            conf_set_str(conf, CONF_host, host);
        }
+        conf_free(conf2);
     } else {
        /* Patch in hostname `host' to session details. */
        conf_set_str(conf, CONF_host, host);
@@ -698,7 +699,8 @@ void scp_sftp_listdir(const char *dirname)
     dirh = fxp_opendir_recv(pktin, req);
 
     if (dirh == NULL) {
-       printf("Unable to open %s: %s\n", dirname, fxp_error());
+               tell_user(stderr, "Unable to open %s: %s\n", dirname, fxp_error());
+               errs++;
     } else {
        nnames = namesize = 0;
        ournames = NULL;
@@ -2244,6 +2246,8 @@ static void usage(void)
     printf("  -hostkey aa:bb:cc:...\n");
     printf("            manually specify a host key (may be repeated)\n");
     printf("  -batch    disable all interactive prompts\n");
+    printf("  -proxycmd command\n");
+    printf("            use 'command' as local proxy\n");
     printf("  -unsafe   allow server-side wildcards (DANGEROUS)\n");
     printf("  -sftp     force use of SFTP protocol\n");
     printf("  -scp      force use of SCP protocol\n");
@@ -2269,7 +2273,7 @@ void version(void)
     char *buildinfo_text = buildinfo("\n");
     printf("pscp: %s\n%s\n", ver, buildinfo_text);
     sfree(buildinfo_text);
-    cleanup_exit(1);
+    exit(0);
 }
 
 void cmdline_error(const char *p, ...)