scp: Problem when source and destination are identical

Markus Friedl markus.friedl at informatik.uni-erlangen.de
Sat May 19 05:36:56 EST 2001


does this help:


Index: scp.c
===================================================================
RCS file: /home/markus/cvs/ssh/scp.c,v
retrieving revision 1.70
diff -u -r1.70 scp.c
--- scp.c	2001/05/08 19:45:24	1.70
+++ scp.c	2001/05/18 19:31:07
@@ -777,7 +777,7 @@
 		}
 		omode = mode;
 		mode |= S_IWRITE;
-		if ((ofd = open(np, O_WRONLY | O_CREAT | O_TRUNC, mode)) < 0) {
+		if ((ofd = open(np, O_WRONLY | O_CREAT , mode)) < 0) {
 bad:			run_err("%s: %s", np, strerror(errno));
 			continue;
 		}



More information about the openssh-unix-dev mailing list