summaryrefslogtreecommitdiff
path: root/scp.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-01-31 22:11:37 +1100
committerDamien Miller <djm@mindrot.org>2006-01-31 22:11:37 +1100
commit923f1ce0b779e59bb7c0cf46351b8a262964e7f3 (patch)
tree0733670f493c271186049a2d86b044d4ee855db0 /scp.c
parent50c6eedce395ad0b828067c5e65ce9eb9e1543af (diff)
downloadopenssh-git-923f1ce0b779e59bb7c0cf46351b8a262964e7f3.tar.gz
- djm@cvs.openbsd.org 2006/01/31 10:35:43
[scp.c] "scp a b c" shouldn't clobber "c" when it is not a directory, report and fix from biorn@; ok markus@
Diffstat (limited to 'scp.c')
-rw-r--r--scp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/scp.c b/scp.c
index 2467dcb5..620024ea 100644
--- a/scp.c
+++ b/scp.c
@@ -71,7 +71,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.129 2006/01/31 10:19:02 djm Exp $");
+RCSID("$OpenBSD: scp.c,v 1.130 2006/01/31 10:35:43 djm Exp $");
#include "xmalloc.h"
#include "atomicio.h"
@@ -383,9 +383,9 @@ main(int argc, char **argv)
if ((targ = colon(argv[argc - 1]))) /* Dest is remote host. */
toremote(targ, argc, argv);
else {
- tolocal(argc, argv); /* Dest is local host. */
if (targetshouldbedirectory)
verifydir(argv[argc - 1]);
+ tolocal(argc, argv); /* Dest is local host. */
}
/*
* Finally check the exit status of the ssh process, if one was forked