summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/scp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c
index f423f461e7e..feb96521b2c 100644
--- a/usr.bin/ssh/scp.c
+++ b/usr.bin/ssh/scp.c
@@ -75,7 +75,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.97 2003/01/10 08:19:07 fgsch Exp $");
+RCSID("$OpenBSD: scp.c,v 1.98 2003/01/10 10:29:35 djm Exp $");
#include "xmalloc.h"
#include "atomicio.h"
@@ -848,7 +848,7 @@ bad: run_err("%s: %s", np, strerror(errno));
wrerr = YES;
wrerrno = j >= 0 ? EIO : errno;
}
- if (ftruncate(ofd, size)) {
+ if (wrerr == NO && ftruncate(ofd, size) != 0) {
run_err("%s: truncate: %s", np, strerror(errno));
wrerr = DISPLAYED;
}