From 0605d6d3c119edc96afe3ac21095434977aca7ea Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 25 Jun 2002 18:51:06 +0000 Subject: [PATCH] Forgot to call fxp_init() in `pscp -ls' mode under SFTP. [originally from svn r1748] --- scp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scp.c b/scp.c index cf79a061..a11d53cd 100644 --- 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);