]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Check the return value of flush_write_file() and report an error
authorWayne Davison <wayned@samba.org>
Thu, 2 Dec 2004 17:16:19 +0000 (17:16 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 2 Dec 2004 17:16:19 +0000 (17:16 +0000)
if it reports failure.

receiver.c

index b4a32d5c21c4e965eb38444c4230ccd62005c95e..70978fd9bd48cea56addbed1308a273cae773c9c 100644 (file)
@@ -289,7 +289,8 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
                offset += len;
        }
 
-       flush_write_file(fd);
+       if (flush_write_file(fd) < 0)
+               goto report_write_error;
 
 #ifdef HAVE_FTRUNCATE
        if (inplace && fd != -1)