X-Git-Url: https://mattmccutchen.net/rsync/rsync-patches.git/blobdiff_plain/71c2e1b24c9024fd4f6112b31a89d8ad3216d411..9c18601b1c8b7cfe87f3e7cee7b125dc10d362d1:/fsync.diff diff --git a/fsync.diff b/fsync.diff index 276c454..9877bcb 100644 --- a/fsync.diff +++ b/fsync.diff @@ -86,13 +86,14 @@ To use this patch, run these commands for a successful build: 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; + } +