summaryrefslogtreecommitdiff
path: root/sftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp.c')
-rw-r--r--sftp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sftp.c b/sftp.c
index 911a04f2..8c887fbc 100644
--- a/sftp.c
+++ b/sftp.c
@@ -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"
@@ -46,6 +45,8 @@ extern char *__progname;
char *__progname;
#endif
+#include "scp-common.h"
+
int use_ssh1 = 0;
char *ssh_program = _PATH_SSH_PROGRAM;
char *sftp_server = NULL;
@@ -209,7 +210,7 @@ main(int argc, char **argv)
userhost = xstrdup(argv[optind]);
file2 = argv[optind+1];
- if ((cp = strchr(userhost, ':')) != NULL) {
+ if ((cp = colon(userhost)) != NULL) {
*cp++ = '\0';
file1 = cp;
}
@@ -226,6 +227,7 @@ main(int argc, char **argv)
make_ssh_args(userhost);
}
+ host = cleanhostname(host);
if (!*host) {
fprintf(stderr, "Missing hostname\n");
usage();