diff options
Diffstat (limited to 'scp.c')
-rw-r--r-- | scp.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -75,7 +75,7 @@ | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | #include "includes.h" | 77 | #include "includes.h" |
78 | RCSID("$OpenBSD: scp.c,v 1.97 2003/01/10 08:19:07 fgsch Exp $"); | 78 | RCSID("$OpenBSD: scp.c,v 1.98 2003/01/10 10:29:35 djm Exp $"); |
79 | 79 | ||
80 | #include "xmalloc.h" | 80 | #include "xmalloc.h" |
81 | #include "atomicio.h" | 81 | #include "atomicio.h" |
@@ -864,7 +864,7 @@ bad: run_err("%s: %s", np, strerror(errno)); | |||
864 | wrerr = YES; | 864 | wrerr = YES; |
865 | wrerrno = j >= 0 ? EIO : errno; | 865 | wrerrno = j >= 0 ? EIO : errno; |
866 | } | 866 | } |
867 | if (ftruncate(ofd, size)) { | 867 | if (wrerr == NO && ftruncate(ofd, size) != 0) { |
868 | run_err("%s: truncate: %s", np, strerror(errno)); | 868 | run_err("%s: truncate: %s", np, strerror(errno)); |
869 | wrerr = DISPLAYED; | 869 | wrerr = DISPLAYED; |
870 | } | 870 | } |