X-Git-Url: http://andersk.mit.edu/gitweb/openssh.git/blobdiff_plain/ca24b5507e1129858ef7c87a4549f0e44237a7b1..13455c70065bfbf07f1e51e3c16816ca264be549:/sftp.c diff --git a/sftp.c b/sftp.c index 16f84987..3bacb7d5 100644 --- a/sftp.c +++ b/sftp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sftp.c,v 1.119 2010/01/13 01:40:16 djm Exp $ */ +/* $OpenBSD: sftp.c,v 1.120 2010/01/13 04:10:50 djm Exp $ */ /* * Copyright (c) 2001-2004 Damien Miller * @@ -1760,15 +1760,12 @@ complete_match(EditLine *el, struct sftp_conn *conn, char *remote_path, } lf = el_line(el); - /* - * XXX should we really extend here? the user may not be done if - * the filename is a directory. - */ if (g.gl_matchc == 1) { i = 0; if (!terminated) ins[i++] = quote; - if (lastarg || *(lf->cursor) != ' ') + if (*(lf->cursor - 1) != '/' && + (lastarg || *(lf->cursor) != ' ')) ins[i++] = ' '; ins[i] = '\0'; if (i > 0 && el_insertstr(el, ins) == -1)