Comment 3 for bug 1659950

Revision history for this message
Nahuel Greco (ngreco) wrote :

Researching more, I see POSIX has NO way to disable mtime updating while calling write()'s, so there is no way to atomically leave a partial file with an mtime=0 mark while using --inplace.

"rsync --update --partial" (no --inplace) can do it because it transfers first to a temporal file, then updates his mtime (to 0 if unsuccessful, or to the original file mtime if transfer completed), and then rename()'s the file.

So now I think this can't be solved, but a warning should be placed in the rsync manpage about this "-u --partial" unexpected behavior. Take this as a documentation bug.