From 414830ee2a32eff6f713a7db35190d17f14f4084 Mon Sep 17 00:00:00 2001 From: Pontus Freyhult Date: Thu, 23 May 2002 20:15:49 +0200 Subject: [PATCH] Don't even try to do anything if globbing failed. Rev: src/sftp/sftp_bind.c:1.8 --- src/sftp/sftp_bind.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sftp/sftp_bind.c b/src/sftp/sftp_bind.c index 11bfe4f8..7752e9de 100644 --- a/src/sftp/sftp_bind.c +++ b/src/sftp/sftp_bind.c @@ -1449,6 +1449,10 @@ lsftp_do_ls(const char* dir, const char* command, int longlist, int all) fnameg = strdup( dir ); /* Only local glob */ glob = lsftp_dc_r_startglob( dglob, 0, 1 ); /* Not sloppy, leave incorrect ones */ + + if( 1glob ) /* Failed? */ + return -1; /* Bail out */ + orgglob = glob; if( !strlen( fnameg ) ) /* Empty filename glob? */ -- GitLab