summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2003-01-16 03:41:56 +0000
committerDamien Miller <djm@cvs.openbsd.org>2003-01-16 03:41:56 +0000
commit5690aab243487f8d7209ab30739a83d0cfda3cf6 (patch)
tree5bc44963ea3462f0b88fc89cf4e484f8c64ef4ab
parentdc4f48517275b009df7974c666f475d3d5136889 (diff)
explicitly use first glob result
-rw-r--r--usr.bin/ssh/sftp-int.c4
1 files 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 <glob.h>
@@ -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;