=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- src/usr.bin/ssh/sftp.c 2004/01/21 03:07:59 1.40 +++ src/usr.bin/ssh/sftp.c 2004/01/27 10:08:10 1.41 @@ -24,7 +24,7 @@ #include "includes.h" -RCSID("$OpenBSD: sftp.c,v 1.40 2004/01/21 03:07:59 djm Exp $"); +RCSID("$OpenBSD: sftp.c,v 1.41 2004/01/27 10:08:10 djm Exp $"); #include "buffer.h" #include "xmalloc.h" @@ -205,11 +205,6 @@ userhost = xstrdup(argv[optind]); file2 = argv[optind+1]; - if ((cp = colon(userhost)) != NULL) { - *cp++ = '\0'; - file1 = cp; - } - if ((host = strrchr(userhost, '@')) == NULL) host = userhost; else { @@ -219,6 +214,11 @@ usage(); } addargs(&args, "-l%s",userhost); + } + + if ((cp = colon(host)) != NULL) { + *cp++ = '\0'; + file1 = cp; } host = cleanhostname(host);