extern int modify_window;
extern int relative_paths;
extern int human_readable;
-@@ -309,6 +310,12 @@ int copy_file(const char *source, const
+@@ -309,6 +310,13 @@ int copy_file(const char *source, const
full_fname(source));
}
+ if (do_fsync && fsync(ofd) < 0) {
+ rsyserr(FERROR, errno, "fsync failed on %s",
+ full_fname(dest));
++ close(ofd);
+ return -1;
+ }
+