John E. Malmberg convinced me to standardize on #ifs for defined
[rsync/rsync.git] / receiver.c
index a9a9cd2..2f4bc7a 100644 (file)
@@ -228,7 +228,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
        if (flush_write_file(fd) < 0)
                goto report_write_error;
 
-#if HAVE_FTRUNCATE
+#ifdef HAVE_FTRUNCATE
        if (inplace && fd != -1)
                ftruncate(fd, offset);
 #endif
@@ -514,7 +514,7 @@ int recv_files(int f_in, struct file_list *flist, char *local_name,
                        exit_cleanup(RERR_FILEIO);
                }
 
-               if ((recv_ok && !delay_updates) || inplace) {
+               if ((recv_ok && (!delay_updates || !partialptr)) || inplace) {
                        finish_transfer(fname, fnametmp, file, recv_ok, 1);
                        if (partialptr != fname && fnamecmp == partialptr) {
                                do_unlink(partialptr);