From 5690aab243487f8d7209ab30739a83d0cfda3cf6 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Thu, 16 Jan 2003 03:41:56 +0000 Subject: explicitly use first glob result --- usr.bin/ssh/sftp-int.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/ssh/sftp-int.c b/usr.bin/ssh/sftp-int.c index d75420e6290..fd0c8d8eed4 100644 --- a/usr.bin/ssh/sftp-int.c +++ b/usr.bin/ssh/sftp-int.c @@ -25,7 +25,7 @@ /* XXX: recursive operations */ #include "includes.h" -RCSID("$OpenBSD: sftp-int.c,v 1.55 2003/01/14 10:58:00 djm Exp $"); +RCSID("$OpenBSD: sftp-int.c,v 1.56 2003/01/16 03:41:55 djm Exp $"); #include @@ -507,7 +507,7 @@ process_put(struct sftp_conn *conn, char *src, char *dst, char *pwd, int pflag) /* Only one match, dst may be file, directory or unspecified */ if (g.gl_pathv[0] && g.gl_matchc == 1) { - if (!is_reg(g.gl_pathv[i])) { + if (!is_reg(g.gl_pathv[0])) { error("Can't upload %s: not a regular file", g.gl_pathv[0]); err = 1; -- cgit v1.2.3