]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Forgot to call fxp_init() in `pscp -ls' mode under SFTP.
authorSimon Tatham <anakin@pobox.com>
Tue, 25 Jun 2002 18:51:06 +0000 (18:51 +0000)
committerSimon Tatham <anakin@pobox.com>
Tue, 25 Jun 2002 18:51:06 +0000 (18:51 +0000)
[originally from svn r1748]

scp.c

diff --git a/scp.c b/scp.c
index cf79a0616bddd53112af43ee48ea1f022726367d..a11d53cd70a8e5f8cd2fa7caaf9e7c5ccdf1a4c9 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -690,6 +690,12 @@ void scp_sftp_listdir(char *dirname)
     int nnames, namesize;
     int i;
 
+    if (!fxp_init()) {
+       tell_user(stderr, "unable to initialise SFTP: %s", fxp_error());
+       errs++;
+       return;
+    }
+
     printf("Listing directory %s\n", dirname);
 
     dirh = fxp_opendir(dirname);