=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- src/usr.bin/ssh/sftp.c 2001/04/12 23:17:54 1.14 +++ src/usr.bin/ssh/sftp.c 2001/04/16 02:31:44 1.15 @@ -24,10 +24,9 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.14 2001/04/12 23:17:54 mouring Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.15 2001/04/16 02:31:44 mouring Exp $"); /* XXX: commandline mode */ -/* XXX: copy between two remote hosts (commandline) */ /* XXX: short-form remote directory listings (like 'ls -C') */ #include "buffer.h" @@ -40,6 +39,8 @@ #include "sftp-client.h" #include "sftp-int.h" +#include "scp-common.h" + int use_ssh1 = 0; char *ssh_program = _PATH_SSH_PROGRAM; char *sftp_server = NULL; @@ -202,7 +203,7 @@ userhost = xstrdup(argv[optind]); file2 = argv[optind+1]; - if ((cp = strchr(userhost, ':')) != NULL) { + if ((cp = colon(userhost)) != NULL) { *cp++ = '\0'; file1 = cp; } @@ -219,6 +220,7 @@ make_ssh_args(userhost); } + host = cleanhostname(host); if (!*host) { fprintf(stderr, "Missing hostname\n"); usage();