From: Owen Dunn Date: Sat, 18 Feb 2017 22:46:38 +0000 (+0000) Subject: Regard dir/ls on non-existent directory as an error. X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=988e26068eead42aed72573cc1cab14cb9bfebe7;p=PuTTY.git Regard dir/ls on non-existent directory as an error. sftp_cmd_ls - return an error if attempting to open the directory fails. --- diff --git a/psftp.c b/psftp.c index 4fba2d73..5394c1fb 100644 --- a/psftp.c +++ b/psftp.c @@ -1050,6 +1050,7 @@ int sftp_cmd_ls(struct sftp_command *cmd) if (dirh == NULL) { printf("Unable to open %s: %s\n", dir, fxp_error()); + return 0; } else { nnames = namesize = 0; ournames = NULL;