summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/receiver.c b/receiver.c
index 108c8560..1975e580 100644
--- a/receiver.c
+++ b/receiver.c
@@ -458,7 +458,11 @@ int recv_files(int f_in,struct file_list *flist,char *local_name)
if (fd1 != -1) {
close(fd1);
}
- close(fd2);
+ if (close(fd2) < 0) {
+ rprintf(FERROR, "close failed on %s: %s\n",
+ full_fname(fnametmp), strerror(errno));
+ exit_cleanup(RERR_FILEIO);
+ }
if (verbose > 2)
rprintf(FINFO,"renaming %s to %s\n",fnametmp,fname);