| commit | 9f27cd8ca6ccbf1ab4cd8b0b66445535e2573d59 | [log] [tgz] |
|---|---|---|
| author | Wayne Davison <wayned@samba.org> | Tue Apr 27 19:51:33 2004 +0000 |
| committer | Wayne Davison <wayned@samba.org> | Tue Apr 27 19:51:33 2004 +0000 |
| tree | 1ec0d364930b42bbdc6c2e05dca26a9b42fbff4b | |
| parent | b084f9e092159b03c955312b0c90fe95eb490b2f [diff] [blame] |
Check the return code from close() and output an error if it fails.
diff --git a/receiver.c b/receiver.c index 108c856..1975e58 100644 --- a/receiver.c +++ b/receiver.c
@@ -458,7 +458,11 @@ 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);